Don's Tools · Developers · HTML, CSS & JS Minify & Beautify

Minify & beautify code

Format or compress HTML, CSS and JavaScript, right in your browser. Nothing is uploaded.

Language
Action
Minify and Beautify is a free developer tool that formats and compresses HTML, CSS and JavaScript entirely in your browser, with nothing uploaded. Beautifying uses the js-beautify library, minifying JavaScript uses the Terser engine, and CSS and HTML are minified by safely removing comments and unnecessary whitespace, with the size reduction shown.

Files are processed in your browser and never uploaded.

How to use Minify & beautify code

  1. Add your text

    Type or paste your text into the input box. Everything is handled by your own browser, so nothing is sent to a server.

  2. Run it

    Press Beautify it, Don → to produce the result.

  3. Copy or save it

    Copy result, Don puts the result on your clipboard and Download saves it as a file.

What this tool does

Beautify and minify HTML, CSS, JS

JavaScript, CSS and HTML can each be expanded for reading or compressed for shipping, from the same two boxes.

Terser-powered JavaScript minify

JavaScript minification uses Terser, so it renames and drops dead code rather than simply stripping whitespace.

Size savings shown

The before and after sizes are shown with the saving, so you can see whether the change is worth making.

Copy or download with the right extension

Copy result puts it on the clipboard, and Download saves it with the right extension for the language you picked.

Works in your browser, no sign-up

The code is processed in your browser, so unreleased source is never uploaded.

Frequently asked questions

Is my code uploaded anywhere?

No. Formatting runs entirely in your browser with nothing uploaded, so proprietary code stays on your device. A small formatter is loaded once and then cached.

Which languages are supported?

JavaScript, CSS and HTML, each with a Beautify and a Minify action.

What engines does it use?

Beautifying uses the well-known js-beautify library. Minifying JavaScript uses Terser, the same engine used by major bundlers, while CSS and HTML are minified with safe whitespace and comment removal.

Will minifying break my code?

JavaScript is minified with Terser, which is robust and reports a clear error if the code cannot be parsed. CSS and HTML minification only removes comments and unnecessary whitespace.

Can I download the result?

Yes. Copy it, or download it with the correct file extension for the language you chose.

Last updated: