Skip to main content

Stack Trace Formatter

Clean up and reformat a raw exception stack trace into a tidy Markdown block. Detects the language (JavaScript, Python, Java, Ruby, Go, .NET, PHP), extracts the exception type and message, numbers the frames, and optionally collapses noisy framework/vendor frames.

Input

Output

Cleaned Stack (Markdown)
 
Was this helpful?

Guides

Paste a raw exception stack trace and get back a clean, readable Markdown block you can drop into a bug report, a pull request, or a chat message. The Stack Trace Formatter parses traces from seven common runtimes, pulls out the exception type and message, numbers the call frames, and — if you want — folds away the noisy framework and library frames so the lines that actually point at your code stand out.

How to use it

  1. Paste your stack trace into the input box. This works with output copied straight from a terminal, a log file, or an error monitoring dashboard.
  2. Leave Language on Auto-detect, or pick the exact runtime if detection guesses wrong.
  3. Toggle Collapse framework / vendor frames to hide third‑party frames (they are replaced with a short "N frames collapsed" marker), and Show frame numbers to number each frame.
  4. Copy the formatted Markdown or download it as a .md file.

Everything runs locally in your browser — your stack trace is never uploaded to a server.

Supported languages

  • JavaScript / TypeScript — V8 at function (file:line:col) traces, including node:internal frames.
  • PythonTraceback (most recent call last) blocks, including the source snippet under each File "…", line N frame and chained During handling… / The above exception… causes.
  • Java / Kotlinat package.Class.method(File.java:line) traces with Caused by: and Suppressed: chains.
  • Rubyfile.rb:line:in \method'traces withfrom` frames.
  • Gopanic: messages followed by goroutine frames.
  • .NET (C#)at Namespace.Method() in File.cs:line N traces with ---> inner exceptions.
  • PHPFatal error: Uncaught … messages and numbered #0 … stack lines.

What "vendor frames" means

A vendor or framework frame is one that lives inside a dependency rather than your own code — anything under node_modules/, site-packages/, a Ruby gems/ path, the Go module cache, or a known framework namespace such as org.springframework. or System.. When collapse is on, a run of consecutive vendor frames is replaced by a single summary line, so a 40‑line trace often shrinks to the handful of frames that matter.

Why format a stack trace at all?

Raw traces are hard to read and hard to share: they wrap badly in chat, bury the exception message among dozens of frames, and mix your code with library internals. A cleaned, fenced Markdown block renders as a monospaced code block everywhere Markdown is supported (GitHub, GitLab, most issue trackers and chat apps), keeps the exception type and message up top, and lets a reviewer see the failing frame at a glance.

Does it change the meaning of my trace?

No. It only reorganizes and labels what is already there. Frame order, file paths, and line numbers are preserved exactly; collapsing vendor frames hides them from view but never renames or reorders your own frames.

stack traceexceptionerrordebuggingtracebackmarkdown

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.