Canonical: https://toolipedia.app/stack-trace-formatter-cleaner

# Stack Trace Formatter and Cleaner

Paste a Java, Python, JavaScript or .NET stack trace to get it indented, with library frames folded away and the frames of your own code highlighted.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Stack Trace Formatter and Cleaner

## About Stack Trace Formatter and Cleaner

Paste a Java, Python, JavaScript or .NET stack trace and the page indents it consistently, folds each run of library frames into one line such as '... 3 library frames hidden' and highlights the frames that belong to your own code. Library frames are recognised from well-known prefixes like java., site-packages, node_modules and System., or you can list your own package names and treat every other frame as library code. The frame of yours closest to the error is shown on top: the first one for Java, JavaScript and .NET, the last one for Python.

## How to use Stack Trace Formatter and Cleaner
1. Paste the stack trace and leave the language on automatic detection, or choose it yourself.
2. Optionally type your own package or folder names, separated by commas, to decide which frames are yours.
3. Read the highlighted view, then copy the cleaned text from the result box.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- stack trace formatter and cleaner
- format stack trace
- clean java stack trace
- python traceback formatter
- collapse library frames
- stack trace highlighter

## Frequently asked questions

### Which stack traces can this page read?

Java and Kotlin traces with Caused by sections, Python tracebacks, JavaScript traces from V8 and from Firefox or Safari, and .NET traces including the in file and line parts. Other formats are shown as plain lines.

### How does it decide which frames are my own code?

If you type package or folder names, every frame containing one of them is yours. If you leave the field empty, only well-known library frames are folded and everything else counts as yours.

### Is my stack trace uploaded anywhere?

No. The trace is read and rewritten by JavaScript on this page, so file paths and class names in it never leave your device.

### Is Stack Trace Formatter and Cleaner free?

Yes. Stack Trace Formatter and Cleaner on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Stack Trace Formatter and Cleaner:
- [Source Map Stack Trace Decoder](https://toolipedia.app/source-map-stack-trace-decoder)
- [Log File Filter and Highlighter](https://toolipedia.app/log-file-filter-highlighter)
- [JSON to classes (Java, C#, Python, Go, Kotlin, Swift)](https://toolipedia.app/json-to-classes)
- [SQL formatter](https://toolipedia.app/sql-formatter)
- [Regex library](https://toolipedia.app/regex-library)
