JavaScript Minifier and Beautifier — Parse, Format and Copy

Developer Tools

Loading tool...

About This Tool

Minify or format JavaScript while preserving strings and syntax. Review parser errors, keep license comments and compare UTF-8 output size.

How to Use

  1. Paste JavaScript up to 1,000,000 UTF-16 units.
  2. Choose comment removal and optional console.log removal.
  3. Click Minify or Beautify.
  4. Check the result and test it in your application before copying.

Format JavaScript with a parser

Paste code and choose Minify or Beautify. The parser distinguishes strings, regular expressions, templates and comments. Invalid syntax produces an error instead of a misleading output. Names are not mangled. The tool does not execute the supplied code.

Options that affect output

Comment removal retains recognized license comments. Beautify preserves comments. Removing console.log is optional and can remove evaluation of its arguments, so do not enable it when those expressions have side effects. Other console methods are retained. Size statistics use UTF-8 bytes and update after processing.

Limits

The input limit is 1,000,000 UTF-16 units. The parser bundle loads from this site on first use. This is not a TypeScript or JSX compiler and does not produce source maps or validate application behavior. Large inputs can take time; test the copied result in its intended environment. Shared services are described in the privacy policy.

Frequently Asked Questions

Does the tool run my code?
No. It parses and rewrites source text without executing it.
Are all comments deleted?
The removal option retains recognized license comments; Beautify preserves comments.
Can console.log removal change behavior?
Yes. Arguments with side effects may no longer run. Leave this option off unless that change is intended.