JavaScript Formatter / Minifier
Format, beautify, or minify JavaScript code.
Input
Drop file here or click to browse
Maximum 5 MB (.js,.mjs,.cjs,.ts,.txt)
Output
About the JavaScript Formatter / Minifier
Format unreadable JavaScript or minify source for production. Bundled and obfuscated JavaScript is deliberately unreadable, and beautifying it is often the fastest way to understand what a third-party script on your page is actually doing.
How to use it
- 1 Paste the JavaScript you want to process.
- 2 Click Format to restore indentation and line breaks.
- 3 Click Minify to strip whitespace and shorten the output.
- 4 Copy the result to your clipboard.
What it does
- Beautify minified or obfuscated source
- Minify for smaller production bundles
- ES2015+ syntax support including modules and async
- Byte-size comparison
Frequently asked questions
Is my code sent to a server?
No. Every calculation happens locally in your browser using JavaScript. Nothing you paste is uploaded, logged, or stored on a server, which makes the tool safe to use with production data, credentials, and customer records.
Can beautifying recover original variable names?
No. Minifiers rename variables to single letters and that mapping is discarded unless a source map was published. Beautifying restores structure and readability, not the original identifiers. If a .map file exists alongside the bundle, that is what recovers real names.
Is minification the same as obfuscation?
No. Minification shrinks code for performance and is trivially reversible into readable form. Obfuscation deliberately makes logic hard to follow through control-flow flattening and string encoding. Neither protects secrets — anything shipped to a browser can be read.
Does it handle TypeScript?
The formatter handles standard JavaScript syntax. TypeScript-only constructs such as type annotations and interfaces are not part of the JavaScript grammar and may not format cleanly — compile to JavaScript first, or use your editor's TypeScript formatter.