Minify & Beautify Code
Shrink or reformat HTML, CSS, and JavaScript in one place.
Drop a .html, .css or .js file (optional)
or
Max 5MB
Everything runs in your browser — your code never leaves your device. Minify shrinks JavaScript, CSS, and HTML for production; Beautify reformats it back into clean, indented, readable code.
About Minify & Beautify Code.
Minify and Beautify HTML, CSS, and JavaScript
Paste your code, pick Minify or Beautify, and get the result instantly. Minify strips the whitespace, comments, and dead weight that make files bigger than they need to be — JavaScript through terser, CSS through csso, and HTML through a conservative whitespace collapser. Beautify does the reverse: it reindents and reformats compressed or messy code back into something you can actually read.
The language is auto-detected, or you can set it yourself with one tap. Every run shows the before and after size and the exact percentage saved, so you can see precisely what you gained. Copy the result or download it as a real file.
Unlike most online minifiers, this one runs entirely in your browser — nothing is uploaded to a server. That matters when the code you're pasting belongs to a client, is an unreleased feature, or is anything you'd rather not hand to a third party.
Common Use Cases
- Ship smaller assets: Minify a stylesheet or script before deploying to cut page weight and speed up load times.
- Read minified code: Beautify a compressed vendor file or a one-line snippet so you can see what it actually does.
- Clean up inherited code: Reformat inconsistent, hand-edited HTML or CSS into tidy, uniform indentation.
- Inline snippets: Compress a small script or style block to paste into an email template, a CMS field, or a bookmarklet.
- Quick size check: See exactly how many bytes a file saves when minified before you wire up a full build step.
- Sensitive code: Minify or format proprietary or client code without it ever leaving your machine.
An honest note: auto-detection is a best guess — if it picks the wrong language, switch it with the language buttons. The HTML minifier is deliberately conservative: it collapses whitespace and drops comments but never rewrites your tags or attribute values, so it saves less than an aggressive build-tool minifier in exchange for never breaking your markup.
Privacy: Everything runs entirely in your browser. Your code is never uploaded, stored, or sent anywhere — there's no server, no account, and no daily limit.
How to use Minify & Beautify Code.
Upload your file
Drag and drop or click to select your file.
Choose settings
Adjust quality, size, or format options.
Download result
Your processed file is ready instantly.
Related dev tools.
Privacy-first tools that work everywhere.
Need more than a tool?
Custom websites and web apps that you own — from $799 one-time.
Explore all 188 tools