lobsite! Sign in Sign up

6 free tools · no sign-up · nothing uploaded

Free online code formatters and minifiers

Make minified HTML, CSS and JavaScript readable again, or shrink it for production. Everything runs in your browser.

Every formatter and minifier

HTML, CSS and JavaScript, each with a formatter and a minifier.

Format or minify code in 3 steps

  1. Pick the tool

    HTML, CSS or JavaScript; a formatter to read code, a minifier to ship it.

  2. Paste your code

    Or open a file, or start from the sample. The result appears as you type.

  3. Copy or download it

    Minifiers show the size before and after.

Which formatter or minifier do I need?

Format Minify
HTML HTML Formatter HTML Minifier
CSS CSS Formatter CSS Minifier
JavaScript JavaScript Formatter JavaScript Minifier

Format or minify: which one?

Format when you need to read code: a minified file you want to debug, a page an AI assistant squashed onto one line, or a stylesheet with no consistent indentation. Formatting changes only whitespace, so the code still works the same.

Minify before you publish: removing whitespace and comments, and shortening names and values, makes files smaller so pages load faster. Keep the readable version as your source and minify a copy.

Minifying a whole site

The tools here work on one file at a time. For a whole site, a build tool like Vite minifies everything on each build. Lobsite, like most hosts, already compresses files with gzip or Brotli on the way to the visitor, so minifying matters most for large scripts and stylesheets.

Code formatter and minifier FAQ

Is my code uploaded?

No. Every formatter and minifier runs in your browser; your code never leaves it.

Which libraries do they use?

Well-known open-source ones, running in your browser: js-beautify for the formatters, Terser for JavaScript, csso for CSS, and html-minifier-terser for HTML.

Can minifying break my code?

Rarely, and the minifiers only make changes that keep the behaviour the same. Test the minified version before you publish it, and keep the original.

Are they free?

Yes, with no account and no limit on use.

Publish your site, minified or not

Drop the folder, or run one command. Free, and live in seconds.

Drop your files

More free website tools