Unminify and pretty-print JavaScript, JSX and JSON with your brace and indent style. Runs entirely in your browser, so nothing is uploaded.
6 answers to what people ask most about the JavaScript Beautifier.
No. Minifiers rename variables to single letters and that information is gone. Beautifying restores layout and readability, not the original names or comments.
No. It reformats code as written without running or validating it. Run a linter or your build to catch syntax errors.
JSX works with JSX support turned on. Most TypeScript formats well too, though some type syntax may not indent perfectly.
Same line keeps { at the end of the line, which is the most common JavaScript style. New line puts every opening brace on its own line (Allman). End expand keeps { on the line but puts else and catch on new lines.
Yes, JSON is valid JavaScript. For JSON with validation and key sorting, the JSON Formatter is a better fit.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue