Minify HTML, CSS, and JavaScript to reduce file size and improve performance. Free online code minifier. No signup required.
Minifying HTML, CSS, and JavaScript reduces file sizes, which directly improves page load times and Lighthouse performance scores. It is especially useful for quickly checking the compressed size of a script, preparing code snippets for embedding in a bookmarklet, or minifying a small standalone utility script without setting up a full build pipeline.
All processing for Code Minifier runs entirely in your browser. Your data — whether text, files, or other content — is never transmitted to any server. DevToolHub has no backend that receives or stores your inputs. This means the tool works even offline once the page has loaded, and there is no risk of your data being intercepted or stored by a third party.
Is this safe for my production code?
This tool uses a regex-based minifier, ideal for quick checks and small scripts. For production, use parser-based tools like Terser for JavaScript or Lightning CSS, which are integrated into build tools like Vite and Webpack.
What's the difference between minification and uglification?
Minification removes unnecessary characters such as whitespace and comments. Uglification goes further by renaming variables and functions to shorter versions, producing smaller but unreadable code.
How much file size reduction can I expect?
CSS with lots of formatting typically shrinks 20-40%. JavaScript with detailed comments can shrink 30-50%. For the largest savings, combine minification with gzip or Brotli compression at the server level.
DevToolHub offers 25+ free browser-based developer tools. Explore the full toolkit — no signup or installation required for any of them.