JavaScript Formatter
Runs in your browserFormat and beautify JavaScript with Prettier — consistent indentation, quotes, and spacing applied to minified or messy source.
About this tool
Minified production JavaScript is unreadable by design — everything on one line, short variable names, no whitespace. This tool runs Prettier's JavaScript printer to restore consistent structure: proper indentation, line breaks, and spacing. It won't recover original variable names or comments that minification stripped, but it will make the control flow and structure legible again.
How to use
- Paste your JavaScript.
- Run the formatter.
- Copy the formatted result.
When to use this tool
- Making minified production JS readable while debugging.
- Standardising formatting on a snippet before sharing it.
- Cleaning up code pasted from an inconsistent source.
Tips
- This restores structure, not names — minified variable names stay short since that information was already discarded.
- For TypeScript-specific syntax, this parser won't handle it — stick to plain JavaScript or JSX.
Limitations
- Formats standard JavaScript (ES modules/JSX included). TypeScript-specific syntax isn't parsed by this formatter.
FAQ
- Can this un-minify variable names?
- No. Minification is one-way — the original names are gone. This only restores formatting, indentation, and line breaks.
- Is my code sent anywhere?
- No. Formatting runs entirely in your browser using Prettier.