Code Minifier & Beautifier Free

Paste JavaScript, CSS, HTML or JSON and choose Minify to shrink it or Beautify to make it readable again. The size before and after is shown so you can see the saving.

🗜️ Source code

✅ Output

🗜️Run minify to see the result.
Built by Pyalm

Fast pages rank better and convert better. Pyalm builds performance-first Next.js websites — the kind where minification is the least of the optimisations.

Pyalm serviceWebsite developmentFast, SEO-ready business websites and web apps built in Next.js — designed around the questions your buyers ask.See website development Pyalm serviceCustom softwareInternal tools, portals and business systems built around how your team actually works — not the other way round.See custom software

Smaller files, faster pages

Minification strips comments, whitespace and long variable names that browsers don't need. On a typical script that cuts 30–60% off the file size before compression — fewer bytes to download, parse and execute, which helps Core Web Vitals on mobile connections.

Beautify to understand

Got a minified snippet from a third-party widget or a production bundle you need to debug? Beautify re-indents it into readable code. It can't restore original variable names, but structure and logic become easy to follow.

Related

More free tools you might need

🧾

JSON Formatter & ValidatorFree

Format, validate, minify and syntax-highlight JSON — with exact error line and column.

🪶

Image CompressorFree

Shrink JPG, PNG and WebP images without visible quality loss — bulk and private.

🔍

SERP Snippet PreviewFree

Preview how your title and meta description look on Google — desktop and mobile, with pixel widths.

Browse all free tools

FAQ

Frequently asked questions

Is minified code safe to use in production?

Yes — that's what it's for. JavaScript is minified with Terser, the same engine used by webpack, Next.js and Vite. Always test after minifying hand-written code, especially if it relies on function names at runtime.

Does minifying obfuscate my code?

Only lightly. Minified code is hard to read but trivial to beautify again, so never rely on it to hide secrets. API keys in front-end code are always visible to users.

Should I minify if my server uses gzip or Brotli?

Yes. Compression and minification stack: minify first, then compress. Together they give a smaller result than either alone.

Want a website that ranks and converts?

Fast pages rank better and convert better. Pyalm builds performance-first Next.js websites — the kind where minification is the least of the optimisations.

See website development