JS Beautifier
Format and beautify JavaScript
Input Code
Formatted Code
About JavaScript Beautifier & Formatter
1What is it?
Deobfuscate and format minified JavaScript code. This advanced formatter restores standard formatting conventions, including indentation, spacing, and brackets, making unreadable scripts understandable again. It runs entirely in your browser, ensuring your code remains private.
2Use Cases
- Reverse engineer how a minified script works
- Debug production errors in minified code
- Clean up messy code prototypes before connecting to repo
- Format JSONP or JS object literals
- Audit third-party scripts for security reviews
3Examples
Beautify JS
Input
function f(a){return a+1}Output
function f(a) {
return a + 1;
}?Frequently Asked Questions
Can it format TypeScript?
Yes, TypeScript syntax is a superset of JavaScript, so this formatter generally handles TS code very well, preserving type annotations and interfaces correctly.
Does it change variable names?
No, a beautifier only changes whitespace and formatting. It cannot restore original variable names if the code was obfuscated (e.g., renaming 'userController' to 'a').