← Tools

JavaScript Beautifier & Minifier

Tidy up JavaScript, or make it as small as it can safely be.

Private: your files never leave your device.

How it works

  1. Choose your files.
  2. Adjust the settings if you like.
  3. Download the result, or send it to another device with BroAllDone.

Frequently asked questions

How do I beautify JavaScript?

Paste your code or open a file, then tap Beautify JavaScript. Choose the indent, the line length and where braces go. Minified code becomes readable again.

How do I minify JavaScript?

Tap Minify. Terser, the minifier used by webpack and Vite, removes spaces and comments, shortens variable names and optimizes the code.

Does it support modern JavaScript?

Yes. Arrow functions, classes with private fields, async and await, optional chaining and ES modules all work. Code with import or export is minified as a module automatically.

Will minifying break my code?

Terser keeps the code working the same way. If your code relies on function or class names, tick Keep function and class names. License comments that start with /*! are kept.

Does it find syntax errors?

Yes. Your code is checked as you type, and errors show their line and column. Tap Show me to jump to the spot.

Is my code uploaded?

No. Everything happens in your browser, so your code never leaves your device.

More free tools