How to Beautify a Minified Stack Trace
Map a cryptic production stack trace back to readable source file names and line numbers using source maps and the Stack Trace Beautifier.
Tool Used
Stack Trace Beautifier
Copy the minified stack trace
Copy the raw stack trace from your error monitoring tool (Sentry, Datadog, Rollbar) or from a browser console error. The trace will reference minified bundle files like main.abc123.js:1:45821 — column numbers in the thousands because the entire bundle is on one line. Copy the full stack trace including the error type and message.
Get the source map for the bundle
You need the source map (.map file) for the bundle referenced in the stack trace. Source maps are generated by your bundler (webpack, Vite, esbuild) during the build. If your build output goes to a dist/ or .next/ folder, look for files ending in .js.map. The source map filename matches the bundle — main.abc123.js has main.abc123.js.map. Download or copy the contents of the .map file.
Paste both into the beautifier
Open the Stack Trace Beautifier tool. Paste the minified stack trace into the Stack Trace field. Paste the source map JSON into the Source Map field, or upload the .map file using the upload button. If multiple bundles appear in the stack trace, you may need to map each bundle separately.
Click Beautify and read the mapped trace
Click Beautify. The tool maps each minified position to its original source location and outputs the mapped stack trace with real file paths, function names, and line numbers — for example, at UserList (src/components/UserList.tsx:87:12). This tells you exactly which file and line in your source code produced the error.
Navigate to the failing location in your source
Use the mapped file path and line number to navigate directly to the failing code in your IDE. Open src/components/UserList.tsx and go to line 87. Read the code at that location in the context of the error message. This is almost always enough to understand the root cause. Set up automated source map uploads to your error monitoring service so future errors are mapped automatically.
All done!
You are ready to use Stack Trace Beautifier like a pro.