consolelog.tools

Stack Trace Formatter

Beautify and analyze JavaScript stack traces for easier debugging

About this ToolHow it works, benefits & use cases

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

  1. 1Paste the raw stack trace into the input panel, or click "Load example" to try a sample TypeError trace.
  2. 2Pick an output style from the dropdown: Pretty (with boxes), Compact, JSON, or Markdown.
  3. 3Toggle "Shorten file paths" to collapse long absolute paths to node_modules/, src/, or dist/ roots.
  4. 4Toggle "Include source" if your frames carry source snippets you want shown.
  5. 5Click "Format Stack Trace" for the full formatted view, or "Extract Important Frames" to list only user-code frames.
  6. 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