Dev TooloraLocal dev tools

> Logs & Diagnostics

Stack Trace Cleaner

Clean JavaScript, TypeScript and Python stack traces into concise frames.

Runs locallyWorks offline
Back to results
Input

Source data

Output

Result

Your result will appear here.

Tool guide

About this tool.

  • A stack trace lists execution frames associated with an exception. This tool extracts common at-style JavaScript/TypeScript frames, with or without a function name, and File-style Python frames.
  • It retains recognized source order, removes blank lines and consecutive duplicate frames, and creates a concise Markdown report.
  • For Python-only input it uses the last non-frame line as the exception; otherwise it uses the first. Mixed exception chains and source-code lines are not fully reconstructed.

  • Prepare a short trace for a bug report.
  • Remove immediately repeated frames without reordering the call sequence.
  • Keep the original trace for source context, source-map resolution and detailed debugging.

Paste the full trace or apply a sample.

Run cleaning and review the chosen exception and ordered frames.

Compare against the original before discarding context.

Copy or download Markdown. Paths, function names and exception messages are not redacted.

  • TypeError: demo and at parse (/app/a.ts:12:9) → Exception: TypeError: demo, Frames: 1.
  • A traceback ending in ValueError: demo → Exception: ValueError: demo with its File "app.py", line 10, in run frame.
  • at run (/app/a.ts:1:2) twice in a row → one frame.
  • Frames a, b, a → three frames; only adjacent repeats collapse.
  • Mixed JavaScript and Python frames → listed in their original input order.
  • INFO started → an error: no supported stack frames found.
  • at /app/server.js:10:5 without a function name → kept as a frame.

  • Input is limited to 1,048,576 UTF-16 characters. No network requests or execution of log contents occur.
  • Reports and transformed logs may still contain names, paths, identifiers or personal data. Review before copying or sharing.
  • Java at frames with a file and line, such as at com.example.App.run(App.java:42), are listed like JavaScript frames. Native Method and Unknown Source frames are skipped, and Caused by chains and ... N more lines are not reconstructed.
  • Browser name@url frames, .NET and native traces and source-map resolution are unsupported.
  • Consecutive duplicate removal does not mean globally unique frames.
  • The report omits source-code context and may simplify chained exceptions.
  • Paths and exception messages can contain sensitive values; use separate redaction and review.

FAQ

Questions about Stack Trace Cleaner

Which stack trace formats are supported?

JavaScript and TypeScript at frames with or without a function name, such as at parse (/app/a.ts:12:9) and at /app/server.js:10:5, V8 built-in frames such as at Array.map (<anonymous>) and at Promise.all (index 0), Python File "…", line N frames, and Java at frames that name a file and line. Firefox or Safari name@url frames and .NET frames are not recognized.

Does it remove duplicate frames?

Only consecutive duplicates. Identical lines next to each other collapse to one, but a frame that reappears after a different frame stays, so recursion patterns remain visible.

How is the exception line chosen?

For a Python traceback the last non-frame line, such as ValueError: bad, is used. Otherwise the first non-frame line, usually the JavaScript error message, is used.

Does it resolve source maps?

No. This tool keeps paths, line numbers and column numbers exactly as written. To map minified bundle locations back to the original sources, use Source Map Resolver with the bundle's .map files.

Are file paths and error messages redacted?

No. Paths, function names and exception messages are copied as they are and can include user names or secrets. Run Raw Log Redactor and review the result before sharing.

Continue with

Log FilterKeep log lines that match an include regex and avoid an exclude regex.Raw Log RedactorMask credentials and tokens in raw logs before sharing them.Regex TesterInspect JavaScript regex matches, capture groups and replacements with explicit flags and an isolated execution limit.Text StatisticsUnderstand Unicode text length, words, lines, UTF-8 size and estimated reading time.