# HTML, CSS & JS Minifier

> Strip whitespace and comments to shrink HTML, CSS and JavaScript for production.

To minify code, paste it and choose the language. Comments and unnecessary whitespace are removed and the size saving is reported. This is a safe textual minifier — it never renames variables, so the output stays debuggable.

**URL:** https://convertto.tech/t/code-minifier
**Category:** Data & Format Tools (https://convertto.tech/c/data-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Approach:** Whitespace and comments only — no variable renaming
- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your code.
2. Choose the language.
3. Turn "Also shorten values" on or off as needed.
4. The result appears immediately — copy or download it.

## FAQ

### Is this as good as a build-tool minifier?

No, and deliberately so. esbuild and Terser also rename variables, drop dead code and rewrite expressions, which needs a full parse. This tool is for quick one-off snippets where you want the output to remain readable and safe.

## Related tools

- [CSS, SCSS & Less Formatter](https://convertto.tech/t/css-formatter): Format stylesheets with consistent indentation, spacing and property ordering.
- [SVG Optimizer](https://convertto.tech/t/svg-optimizer): Strip editor cruft and optimise path data to cut SVG file size, usually by half or more.
- [HTML Formatter](https://convertto.tech/t/html-formatter): Format and indent HTML properly, preserving inline elements and whitespace sensitivity.
- [Image Compressor](https://convertto.tech/t/image-compressor): Drop an image, see its current size and dimensions auto-detected, then set your targets and compress.
- [Data URI Generator](https://convertto.tech/t/data-uri-generator): Turn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.
- [CSS Border Radius Generator](https://convertto.tech/t/border-radius-generator): Drag eight handles to shape every corner: elliptical radii, inverted corners and squircles.
- [CSS Box Shadow Generator](https://convertto.tech/t/box-shadow-generator): Design a CSS box-shadow with live values for offset, blur, spread and colour.
- [CSS Button Generator](https://convertto.tech/t/css-button-generator): Design a button and copy the CSS, including the hover, active and focus-visible states.
