Minifier
CSS, JS and HTML
No database: AIMRAN doesn't store your files, text or results
What is Minifier?
Minifying means removing everything from code that the computer doesn't need, such as spaces, line breaks and comments, so files are smaller and the site loads sooner.
Paste your CSS, JavaScript or HTML and you'll get the compressed version instantly, with the savings in bytes and as a percentage.
How to use it
- Choose the language: CSS, JavaScript or HTML.
- Paste the code into the “Code” box.
- Adjust the options: compress, mangle names, ES module, keep licenses or minify inline CSS and JS.
- Review the result and the savings achieved.
- Copy or download the minified code.
Advantages
- Three languages in one tool.
- JavaScript with Terser: removes dead code and renames variables.
- Keeps /*! … */ license comments if you need them.
- Free, no sign-up and no ads.
Technical details
CSS is minified with a token-based parser that respects strings, url() and /*! license comments: it removes comments, extra whitespace and the last semicolon in each block. JavaScript is processed with Terser, with options to compress (remove dead code and simplify expressions), mangle internal variable names, treat the code as an ES module with import/export, and keep /*! and @license comments. HTML is tokenized while respecting the contents of pre, textarea, script and style; it removes comments and whitespace between tags and can optionally minify CSS in style blocks and JS in script blocks with the same engines. Syntax errors show the line and column. Savings are measured in UTF-8 bytes.
Frequently asked questions
What does minifying code mean?
Removing spaces, line breaks, comments and other unnecessary characters without changing what the code does, so it's smaller and downloads faster.
Does minifying improve SEO?
Indirectly, yes: it reduces page weight and improves loading speed, which Google takes into account as part of page experience.
Can code be unminified?
It can be reformatted with indentation, but comments and the original names of mangled variables are lost. Always keep the original.
What does the “Mangle names” option do?
It renames variables inside functions with one or two-letter names. It saves a lot of space without affecting how the code works.
What's the difference between minifying and gzip compression?
Minifying removes unnecessary content from the code; gzip or Brotli compress the file when it's sent. They complement each other and it's best to use both.
More Developers tools
- Base64, URL and HTML · Encode and decode in all three formats
- Hash generator · MD5 and SHA for text or files
- UUID generator · Unique identifiers instantly
- Strong passwords · With a strength meter
- JWT decoder · Read header, payload and expiry
- Regex tester · Highlighted matches and groups
- Colours and gradients · HEX, RGB, HSL, OKLCH, contrast and gradients
- CSS shadows · box-shadow with live preview