JavaScript Beautifier & Minifier

Format, beautify, and minify JavaScript in your browser. Configure indentation, toggle strict mode, and compare input vs output size. No upload, no size limit.

How it works

What the minifier does

The minifier performs four passes: (1) remove comments and block comments, (2) replace all optional semicolons with ASI-compatible newlines, (3) collapse consecutive whitespace to single spaces or newlines, and (4) rename local variables to shorter names using a safe rename map that preserves global scope. Strings are never touched.

Safety guarantees

Global `var`/`let`/`const` declarations, `window.*`, `document.*`, `localStorage`, and any identifier assigned to an object literal are excluded from renaming. The minifier targets only function-scoped identifiers. For complete minification with tree-shaking and dead-code elimination, use a build tool like esbuild, terser, or swc — they run at build time and have full module context.

Next steps

Frequently Asked Questions

How do I minify JavaScript?
Paste your JS into the input and click Minify. The tool removes whitespace, comments, and renames local variables to shorter names where safe. The output is syntactically valid ES5+ JavaScript.
Does minification rename all variables?
Only variables in local scope (function parameters, local declarations) are renamed to single letters. Global variables, properties on `window` or `document`, and strings are never renamed because doing so would change the program's behaviour.
Is my data sent to a server?
No. Every tool on jsonversal runs entirely in your browser using the Web Crypto API, File API, and Clipboard API. Nothing is ever uploaded — not even the JSON you paste in.
Do I need an account or API key?
No signup, no email, no API key. All tools are free to use with no signup required.
Can I use these tools offline?
Yes. Once the page loads, all tools work offline. There are no external API calls or CDN dependencies at runtime.
🔒
Your data never leaves your device

All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.

esc
↑↓ navigate ↵ open esc close