JavaScript Minifier & Beautifier
Minify JavaScript snippets by stripping comments and whitespace, or beautify compressed code with simple re-indentation. Perfect for quick demos; use a real bundler like esbuild or terser for production apps.
Runs entirely in your browser. Your data never leaves this device.
- Minify JS snippets
- Beautify / re-indent
- Comment removal
- Char count compare
- No bundler needed
How it works
- Paste JavaScript source into the editor.
- Minify to strip comments/whitespace or Beautify to re-indent braces.
- Copy the output. For production apps prefer a bundler (esbuild/terser) — this is for quick snippets.
Key features
- Minify JS snippets
- Beautify / re-indent
- Comment removal
- Char count compare
- No bundler needed
FAQ
Is this Terser/Uglify?
No — a fast client-side minify/beautify for snippets. Use a proper bundler for production builds.
Will minify break ASI edge cases?
Aggressive whitespace removal can affect unusual ASI. Review critical snippets after minifying.
Does it obfuscate?
No — it only removes comments and whitespace / re-indents. No identifier mangling.
TypeScript supported?
Paste compiled JS or simple TS-looking code at your own risk; this is a JS text tool.
Keep building
Related developer tools
Minify or beautify CSS instantly. Perfect for production bundles and readable source.
Beautify or minify HTML online. Free HTML formatter for cleaner markup — client-side only.
Format, validate, minify, and sort JSON in your browser. Privacy-first — nothing leaves your device.