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
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
- 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.
- Leave Language on Auto-detect, or pick the exact runtime if detection guesses wrong.
- 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.
- Copy the formatted Markdown or download it as a
.mdfile.
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, includingnode:internalframes. - Python —
Traceback (most recent call last)blocks, including the source snippet under eachFile "…", line Nframe and chainedDuring handling…/The above exception…causes. - Java / Kotlin —
at package.Class.method(File.java:line)traces withCaused by:andSuppressed:chains. - Ruby —
file.rb:line:in \method'traces withfrom` frames. - Go —
panic:messages followed bygoroutineframes. - .NET (C#) —
at Namespace.Method() in File.cs:line Ntraces with--->inner exceptions. - PHP —
Fatal 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.