HTML Minifier
Remove comments and extra spaces from HTML to make pages smaller, keeping <pre> and scripts safe.
Tool inputs stay in your browser · optional AI search sends your query
Good to know: Spaces between words and inline tags are kept as one space, so text never sticks together. Conditional comments <!--[if …]> are kept.
How to use it (step by step)
- 1Type or paste your text into the “HTML” box. There is already an example in it so you can see how it works; press Clear to start with your own.
- 2The answer appears right away in the “Minified HTML” box. No button needed.
- 3Press Copy and paste the result wherever you need it.
Words to know
- HTML
- The code language web pages are written in.
- Minify
- Removing spaces, line breaks and comments so code is smaller and loads faster. The computer reads it the same way.
More in Developer
URL ParserInspect a URL’s host, path and query parameters without visiting it.JSON FlattenerFlatten JSON values to escaped JSON Pointer paths.JSON to TypeScript TypesGenerate a TypeScript type from a JSON example.JSON Schema GeneratorCreate a draft JSON Schema from an example object.JSON Path Value ExtractorExtract a value using simple dot and array-index paths.HTTP Status Code LookupLook up common HTTP response code meanings.