JavaScript Minifier & Beautifier
Minify JavaScript to shrink file size or beautify compressed code to read it again. Paste your code, compare before-and-after sizes with the percentage saved, then copy or download the result - everything runs in your browser.
How to use
- Paste your JavaScript into the input box.
- Click Minify to compress it with Terser, or Beautify to format it readably.
- Compare before/after sizes and the percentage saved.
- Copy the output or download it as a .js file.
Tips
- Always keep an unminified original - debugging minified code is painful.
- Beautify is for reading third-party code you received compressed; do not ship beautified code to production.
- Check the saved percentage; if it is tiny, your code may already be optimized or mostly comments.
- Nothing is uploaded, so proprietary code stays private.