Stack Trace Formatter
Beautify and analyze JavaScript stack traces for easier debugging
About this ToolHow it works, benefits & use casesTap to collapse
Paste a raw JavaScript or Node.js stack trace and this formatter parses it into something you can actually read. It recognises Chrome and V8 frames (at fn (file:line:col)), Firefox frames (fn@file:line:col), and Safari’s shorter form, pulling out the error name, message, and every function/file/line/column. Choose one of four output styles — a Pretty boxed report, a Compact one-line-per-frame list, structured JSON, or Markdown for pasting into a ticket or PR. A "Shorten file paths" option trims long absolute paths down to node_modules/, src/, or dist/ relative roots, and "Extract Important Frames" filters out node_modules and internal/ noise so only your own code remains. Everything runs locally in the browser, and the parsed result and options are captured in a shareable URL.
How to Use
- 1Paste the raw stack trace into the input panel, or click "Load example" to try a sample TypeError trace.
- 2Pick an output style from the dropdown: Pretty (with boxes), Compact, JSON, or Markdown.
- 3Toggle "Shorten file paths" to collapse long absolute paths to node_modules/, src/, or dist/ roots.
- 4Toggle "Include source" if your frames carry source snippets you want shown.
- 5Click "Format Stack Trace" for the full formatted view, or "Extract Important Frames" to list only user-code frames.
- 6Copy, download (as .txt, .json, or .md to match the style), or share the result via its URL.
Key Benefits
- Parses Chrome/V8, Firefox, and Safari stack-trace formats automatically
- Four output styles: Pretty boxed report, Compact, JSON, and Markdown
- "Extract Important Frames" strips node_modules and internal/ frames to surface your own code
- Path shortening collapses noisy absolute paths to node_modules/, src/, or dist/
- JSON output gives a structured error/message/frames object for tooling
- Markdown output drops straight into a GitHub issue or pull request
- Runs entirely in the browser — traces never leave your machine
Common Use Cases
- Turning a wall-of-text production error log into a scannable frame list
- Pasting a cleaned-up trace into a bug report or pull request as Markdown
- Isolating the handful of application frames buried under express/library frames
- Converting a trace to JSON to feed into a log-analysis or triage script
- Sharing a formatted trace with a teammate via a single URL
Options
Paste the raw stack trace from your error output
Formatted and parsed stack trace
Run to see the formatted result.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- Code Block FormatterFormat code blocks for Markdown
- CSS FormatterFormat and beautify CSS code
- HTML FormatterFormat and beautify HTML code
- JavaScript FormatterFormat and beautify JavaScript code
- JSON FormatterFormat and validate JSON with syntax highlighting
- TypeScript FormatterFormat and beautify TypeScript code
The parser handles three styles: Chrome/V8 and Node frames written as "at functionName (file:line:column)", Firefox frames written as "functionName@file:line:column", and Safari frames that omit the column number. The first line is treated as the error — if it matches a "SomethingError: message" pattern the error name and message are split out, otherwise the whole line becomes the message.
Instead of formatting the whole trace, it filters down to user-code frames by dropping any frame whose file path contains node_modules or internal/, then lists up to the first five remaining frames with their function name, file, line, and column. It is the fastest way to see where in your own code the error actually originated.

