Free tool · runs in your browser
HTML, CSS & JS Minifier
Paste your code, choose the language, and get a smaller file that works exactly the same.
Minifying is one small speed win
Want the whole site faster?
I speed up WordPress, WooCommerce and Shopify sites end to end: caching, images, scripts, fonts and hosting, aiming for green Core Web Vitals.
What minifying removes
- CSS: comments, line breaks, indentation and spaces around braces, colons, semicolons and commas. Six-digit colours like
#ffffffbecome#fff. - JavaScript: comments and whitespace, plus shorter variable names and simplified code (Terser compress and mangle).
- HTML: comments and repeated whitespace. Inline
<style>is minified too. Content inside<pre>,<textarea>and<script>is left alone.
Frequently asked questions
Is minifying safe?
Yes, when done carefully. This tool only removes comments and spaces that browsers ignore, and keeps the ones that matter (inside calc(), strings, <pre> blocks and text areas). JavaScript is minified with Terser, the same engine most build tools use. Always test the result before replacing a live file.
How much smaller will my files get?
Typically 15 to 30 percent for CSS and HTML, and 40 to 60 percent for JavaScript. Combined with gzip or Brotli compression on your server, pages download noticeably faster.
Does minifying help SEO?
Indirectly. Smaller files load faster, which helps Core Web Vitals and keeps visitors from leaving. Google's PageSpeed Insights flags unminified CSS and JavaScript as an opportunity.
I use WordPress. Do I need this?
Usually not by hand: caching plugins like LiteSpeed Cache, WP Rocket or Autoptimize minify files automatically. This tool is handy for custom code, snippets and checking how much a file can shrink.
More developer & marketing tools
UTM Link Builder
Build campaign tracking links for Google Analytics, with presets for ads, email and social.
JSON Formatter & Validator
Format, validate, minify and explore JSON, with exact error locations.
Meta Tag Generator
Generate SEO title, description, Open Graph and X tags with live previews.
Schema Markup Generator
Create JSON-LD structured data for businesses, articles, products, FAQs, events and more.
Case Converter & Slug Generator
Convert text to UPPER, lower, Title, camelCase, snake_case and SEO-friendly URL slugs.
URL Encoder, Decoder & Parser
Encode or decode URLs and see every part of a link, including query parameters.
.htaccess Redirect Generator
Generate 301 redirects, HTTPS and www rules for Apache and Nginx, including bulk redirects.
Regex Tester
Test regular expressions with live match highlighting, groups and find and replace.
Diff Checker
Compare two texts or code files and see every change, line by line and word by word.
Hash Generator
MD5, SHA-1, SHA-256, SHA-512 and CRC32 hashes of text or files, and checksum checks.
Unix Timestamp Converter
Convert epoch timestamps to dates and back, in any time zone.
Markdown to HTML
Convert Markdown, including AI chat answers, to clean HTML with a live preview.
Lorem Ipsum Generator
Placeholder paragraphs, sentences, words or lists, as plain text or HTML.