JavaScript Minifier and Beautifier — Parse, Format and Copy
Developer Tools
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
- Paste JavaScript up to 1,000,000 UTF-16 units.
- Choose comment removal and optional console.log removal.
- Click Minify or Beautify.
- 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?
Are all comments deleted?
Can console.log removal change behavior?
Guides & Tutorials
In-depth guides for every tool. Learn how to process your data privately, for free, right in your browser.
Read more