Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / Logs & parsing / Stack Trace Formatter

Stack Trace Formatter

Paste a stack trace that a log pipeline squeezed into one line. The formatter restores the line breaks, indents the frames and can fold away framework noise so your own code stands out.


Runs entirely in your browser — nothing you enter here is sent to a server.

Why stack traces arrive on one line

A stack trace is naturally multi-line: an exception message followed by one line per call frame. Structured logging does not get on with that. To keep one event per line, JSON loggers store the trace as a single string with the line breaks written as \n and the indentation as \t. In a log viewer, a terminal or an alert message you then see one very long line that is almost impossible to read.

The formatter reverses that. It finds the trace — on its own or inside a JSON log line — turns the escape sequences back into real line breaks, indents the frames and separates the exception lines from the frames. With folding on, runs of framework frames are collapsed into a single line so the frames from your own code are easy to find.

Read the first line

The exception type and message say what went wrong. Half the time that is all you need.

Then the last "Caused by"

In chained exceptions the bottom-most cause is usually the real one; the ones above are wrappers added on the way up.

Find your first frame

The topmost frame from your own package is where your code met the problem — the line to open in the editor.

Python reads the other way

Python tracebacks list the most recent call last, with the error at the bottom. Use "reverse order" if you prefer one convention.

Keeping traces readable at the source

Log the trace in its own field rather than inside the message, so tools can render it properly. Most log platforms — and most languages' JSON loggers — have a multi-line or "stack" mode for this. And when you send an exception to chat, send the first line and a link: nobody reads sixty frames in a notification.

Frequently asked questions

How do I read a stack trace?

Start with the first line: the exception type and message. Then look for the first frame from your own code — that is where your program was when the error occurred. Frames below it show how execution got there.

How do I convert \n in a log line to real line breaks?

Paste the line here; escaped \n, \t and \" sequences are converted automatically, including when the trace sits inside a JSON object.

Which languages are supported?

Java and other JVM languages, JavaScript and Node.js, Python, .NET, Go, Ruby and PHP traces are recognised. Any other text with escaped line breaks is still unescaped and laid out.

What does "... 12 more" mean in a Java stack trace?

Those frames are identical to the bottom frames of the enclosing exception's trace, so Java omits them to avoid repetition. Nothing is missing.

Related free tools

A calculator answers once. Monitoring answers every minute.

Upzilla checks your sites, servers and APIs around the clock and alerts you the moment something breaks. 10 monitors free, no card required.

Start monitoring free →