JavaScript Beautifier
Format and beautify minified or messy JavaScript code instantly. 2 or 4 space indent, or tabs.
Indent
Size
How to use JavaScript Beautifier
-
Paste your JavaScript
Paste minified or unformatted JavaScript into the input area.
-
Choose indent style
Select spaces (2 or 4) or tabs to match your project's coding style.
-
Copy the result
The formatted code appears instantly. Click Copy to send it to your clipboard.
JavaScript Beautifier FAQ
Can this unminify a production bundle?
Does it support TypeScript?
Does it support JSX or React?
Is the code interpreted or executed?
Is my code sent anywhere?
Background
The Kordu JavaScript Beautifier formats and de-minifies JavaScript code instantly in your browser. Paste in a minified bundle, obfuscated script, or any messy JavaScript and get well-formatted, readable code.
The formatter uses the battle-tested js-beautify library and preserves the semantic structure of your code while applying consistent indentation, brace placement, and whitespace. It handles:
- ES5, ES6+, and modern JavaScript syntax
- Arrow functions, template literals, destructuring
- Async/await and Promises
- JSX (basic support)
- CommonJS and ES module syntax
- Nested function and class structures
Formatting options:
- 2-space indent (most common for modern JS projects)
- 4-space indent (Python-style preference)
- Tab indent (for projects using hard tabs)
Common uses: reading minified third-party scripts, debugging production bundles, formatting code before committing, making copy-pasted code readable, and understanding obfuscated scripts.
All processing runs client-side in your browser. Nothing is uploaded or stored.
Related tools
JSON Formatter
Format, validate, and minify JSON instantly — with configurable indentation, error location, and tree view.
HTML Formatter
Format and beautify messy HTML with configurable indent, wrapping, and attribute handling — paste or type, get clean output instantly.
JSON to TypeScript
Paste JSON and generate TypeScript interfaces or type aliases instantly. Handles nested objects, arrays, and nullables. Free, in-browser.
Base64 Encoder/Decoder
Encode text or files to Base64 or decode Base64 strings back to plain text — real-time, fully in your browser.