What it's for
Turns minified code (everything on one line, no spaces) or badly indented code into a readable format with 2-space indentation — useful for understanding someone else's code, debugging something copied from elsewhere, or reviewing a snippet before using it.
How it works
Uses the open-source, widely tested js-beautify library instead of a homemade implementation — avoiding subtle formatting bugs. Nothing is sent to a server: everything runs in your browser.
Formats only — no minifying
This tool only goes "messy → readable". Safely minifying JavaScript (without breaking the code) requires a full syntax parser — that's not offered here to avoid the risk of producing broken JS; for that, we recommend a build tool like Terser or esbuild.
Frequently asked questions
Does this tool also minify code?
No — it only formats (makes it readable). Safely minifying JS requires a full parser, which we chose not to reimplement here to avoid risking broken code.
Is my code sent to any server?
No — formatting happens entirely in your browser.