Restore readability to compressed, obfuscated, or minified JavaScript. Applies intelligent ES6+ indentation, brace alignment, and keyword spacing. Works on Node.js and browser JS alike.
Key Features
Consistent bracket and indentation formatting for ES6+ syntax
Handles arrow functions, async/await, classes, and template literals
Configurable brace style (collapse, expand, or end-of-line)
Helps de-obfuscate minified scripts for security audits and debugging
How to Use
Paste your minified or unformatted JavaScript into the input area.
Choose your preferred indentation width and brace placement style.
Click "Beautify JS" to format the code.
Examine the clean, structured JavaScript in the output panel.
Copy the formatted script to your clipboard.
Example
Sample input
function add(a,b){return a+b;}const nums=[1,2,3];nums.forEach(n=>console.log(n));
Sample output
function add(a, b) {
return a + b;
}
const nums = [1, 2, 3];
nums.forEach(n => console.log(n));
Edge Cases
Minified bundles with no semicolons
Template literals spanning lines
JSON embedded in JS strings
Frequently Asked Questions
Can this tool rename obfuscated single-letter variables back to their original names?
No tool can guess original variable names once destroyed by an uglifier, but beautifying restores proper indentation and control flow so the logic can be easily read and analysed.
Does this beautifier support JSX or TypeScript?
Standard modern JavaScript and common JSX constructs format cleanly. For complex TypeScript types, standard JS indentation rules are applied.
Is it safe to paste proprietary JavaScript code here?
Formatting runs on our server over HTTPS. Your input is processed in memory and is not stored or logged.
Privacy notice: when you run this tool, your input is sent over HTTPS to our server, processed in memory and returned. It is not stored or logged. Avoid pasting live secrets such as private keys or passwords.