What this minifier does
Three modes — pick the language of your source. Each strips the obvious waste:
- HTML — removes comments (except IE conditionals), collapses inter-tag whitespace, normalizes interior whitespace to single spaces.
- CSS — removes comments, collapses whitespace, removes whitespace around
{ } : ; ,, strips redundant semicolons. - JavaScript — removes block and line comments (quote-aware), collapses whitespace around operators and delimiters. Does not rename variables or do tree-shaking — this is a whitespace minifier, not a bundler.
When this is the right tool
- Quick inline minification for a snippet you're pasting into an email, blog post, or support ticket.
- Shrinking a static HTML page without setting up a build pipeline.
- Inspecting the minified output size before deciding if you need a real minifier.
When it's NOT the right tool
- Production JavaScript bundles — use esbuild, terser, swc, or your bundler's built-in minifier. They rename variables, hoist constants, eliminate dead code, and produce dramatically smaller output.
- CSS with sourcemaps — use Lightning CSS, cssnano, or a PostCSS pipeline.
- Complex HTML with embedded scripts/styles — html-minifier-terser does a more thorough job.
Related tools
- JSON Formatter — Format, validate, and beautify JSON online. 100% client-side — your data never leaves your browser.
- Text Diff — Compare two text blocks line-by-line or word-by-word. Unified and split view. Shows added, removed, and changed segments with full color coding.
- Markdown Preview — Live Markdown preview with GitHub-flavored syntax. Tables, task lists, code blocks, strikethrough. Side-by-side editor and rendered output.
- SQL Formatter — Format and beautify SQL queries. 12 dialect options (PostgreSQL, MySQL, SQLite, MSSQL, BigQuery, Snowflake, and more). Keyword casing control.
Pillar
Part of Data & Format.
Written by Mian Ali Khalid. Last updated 2026-04-25.