UTILSBOX⚡ALL TOOLS54+
JSON.FORMATHub of five tools: format, validate, minify, convert to XML, and compare two JSON documents.//REGEX.TESTERReal-time regular expressions tester, cheatsheet, debugger and replacer.//PDF.SUITEMerge, split, extract text, rotate and convert PDF pages to images.//IMAGE.STUDIOIn-browser photo editor: crop, resize, filters, WebP/PNG and Base64 encoder.//HTML.BEAUTIFYHTML code beautifier, production minifier and entity encoder.//CSS.MINIFYCSS code formatter, production stylesheet minifier and CSS to SCSS converter.//SQL.FORMATTERSQL query beautifier, dialect translator (Postgres/MySQL) and minifier.//SVG.EXCALIDRAWInteractive vector visual editor powered by Excalidraw and SVG formatter.//TEXT.DIFFWord counter, reading time estimator and dual-text diff comparator.//YAML.CONVERTYAML & JSON bi-directional validator and formatter with syntax checking.//XML.PARSERXML document formatter, tree inspector and XML to JSON converter.//GRAPHQL.STUDIOGraphQL query & SDL formatter, minifier, AST field sorter and validator.//BASE64.CODECBase64 and URL-Safe encoder / decoder with full UTF-8 verification.//PASSWORD.GENCryptographically secure random password and entropy strength generator.//URL.STUDIO8-tool URL suite: encode, decode, validator, component parser and builder.//QR.STUDIOCustom QR code generator with embedded logos, colors, gradients and shapes.//ASCII.EXPLORERInteractive ASCII 0-255 table, Alt keyboard codes and CP437 symbols.//KEYCODES.LIVELive KeyboardEvent detector and JavaScript keycodes cheat sheet.//JWT.DEBUGGERJWT token decoder, claims inspector and Web Crypto signature verification.//BINARY.CODECBidirectional text to binary converter with digital rain and ASCII table.//CHARTS.STUDIOInteractive chart generator (bars, lines, pie, scatter) from CSV data.//UUID.V7Bulk generator for UUID v4, time-ordered v7, v1 and live UUID validator.//CSV.JSONBi-directional CSV to JSON converter with custom delimiters & table grid.//COLORS.STUDIOHEX/RGB/HSL/CMYK converter, palette harmonies and WCAG 2.1 contrast tester.//SEO.METASEO Meta Tags, Open Graph cards and real-time Google SERP card preview.//SCHEMA.JSONLDSchema.org JSON-LD structured data generator for Google Rich Snippets.//SITEMAP.XMLStandard XML Sitemap generator (Protocol 0.9) for Google Search Console.//ROBOTS.TXTRobots.txt generator, AI scraper blocking presets and live URL rule tester.//FAKE.DATASynthetic mock data generator: export records to JSON, CSV, SQL and TypeScript.//CLOCK.WORLDReal-time world clock with 3D holographic globe and 174 country timezones.//DATE.CALCDays between dates, exact age, business days, Unix timestamp and cron parser.//CALC.SUITESuite of 56+ online calculators: percentage, mortgage, loan, VAT, BMI & salary.//JSON.FORMATHub of five tools: format, validate, minify, convert to XML, and compare two JSON documents.//REGEX.TESTERReal-time regular expressions tester, cheatsheet, debugger and replacer.//PDF.SUITEMerge, split, extract text, rotate and convert PDF pages to images.//IMAGE.STUDIOIn-browser photo editor: crop, resize, filters, WebP/PNG and Base64 encoder.//HTML.BEAUTIFYHTML code beautifier, production minifier and entity encoder.//CSS.MINIFYCSS code formatter, production stylesheet minifier and CSS to SCSS converter.//SQL.FORMATTERSQL query beautifier, dialect translator (Postgres/MySQL) and minifier.//SVG.EXCALIDRAWInteractive vector visual editor powered by Excalidraw and SVG formatter.//TEXT.DIFFWord counter, reading time estimator and dual-text diff comparator.//YAML.CONVERTYAML & JSON bi-directional validator and formatter with syntax checking.//XML.PARSERXML document formatter, tree inspector and XML to JSON converter.//GRAPHQL.STUDIOGraphQL query & SDL formatter, minifier, AST field sorter and validator.//BASE64.CODECBase64 and URL-Safe encoder / decoder with full UTF-8 verification.//PASSWORD.GENCryptographically secure random password and entropy strength generator.//URL.STUDIO8-tool URL suite: encode, decode, validator, component parser and builder.//QR.STUDIOCustom QR code generator with embedded logos, colors, gradients and shapes.//ASCII.EXPLORERInteractive ASCII 0-255 table, Alt keyboard codes and CP437 symbols.//KEYCODES.LIVELive KeyboardEvent detector and JavaScript keycodes cheat sheet.//JWT.DEBUGGERJWT token decoder, claims inspector and Web Crypto signature verification.//BINARY.CODECBidirectional text to binary converter with digital rain and ASCII table.//CHARTS.STUDIOInteractive chart generator (bars, lines, pie, scatter) from CSV data.//UUID.V7Bulk generator for UUID v4, time-ordered v7, v1 and live UUID validator.//CSV.JSONBi-directional CSV to JSON converter with custom delimiters & table grid.//COLORS.STUDIOHEX/RGB/HSL/CMYK converter, palette harmonies and WCAG 2.1 contrast tester.//SEO.METASEO Meta Tags, Open Graph cards and real-time Google SERP card preview.//SCHEMA.JSONLDSchema.org JSON-LD structured data generator for Google Rich Snippets.//SITEMAP.XMLStandard XML Sitemap generator (Protocol 0.9) for Google Search Console.//ROBOTS.TXTRobots.txt generator, AI scraper blocking presets and live URL rule tester.//FAKE.DATASynthetic mock data generator: export records to JSON, CSV, SQL and TypeScript.//CLOCK.WORLDReal-time world clock with 3D holographic globe and 174 country timezones.//DATE.CALCDays between dates, exact age, business days, Unix timestamp and cron parser.//CALC.SUITESuite of 56+ online calculators: percentage, mortgage, loan, VAT, BMI & salary.//
MODULE 09 · WEB

HTML Tools

Format, minify, encode entities, and validate HTML documents.

Indentation
InputHTML
Resultformat / minify / encode / decode
<!-- click an action on the toolbar -->
Live HTML PreviewLIVE RENDER
VIEWPORT:
BG:
// Technical guide & specifications

Technical guide: the HTML5 content model, context-aware escaping and what minification may omit

How the parser closes tags on its own, why escaping angle brackets alone is not enough, and which whitespace is significant.

1. The parser closes tags for you: content models and implied end tags

The HTML parsing algorithm follows each element content model rather than your indentation. A `<p>` accepts only phrasing content, so `<p><div>x</div></p>` yields an empty paragraph, a div and a second empty paragraph: the opening `<div>` implies the end of the paragraph. The same happens to an `<li>` without a `<ul>`, `<ol>` or `<menu>` ancestor, and to stray text inside `<table>`, which the parser relocates before the table through foster parenting. `<main>` maps to the `main` ARIA role and should appear once per document, while `<h1>` through `<h6>` feed the accessibility tree by their literal number, never recalculated from nesting depth.

2. Character escaping: five predefined entities and why context decides

HTML defines five named references: `&lt;`, `&gt;`, `&amp;`, `&quot;` and `&apos;`. The last one did not exist in HTML 4, so legacy templates are safer with `&#39;`. Escaping those five characters is enough inside a text node and insufficient everywhere else: in an unquoted attribute a single space lets an attacker append `onmouseover=`; inside `<script>` the parser stops at the literal `</script>` sequence even within a string; and in `href` no entity prevents a `javascript:` payload. Correct escaping therefore depends on the insertion context, because text, quoted attributes, URLs, CSS and JavaScript each need different rules.

3. Minification: optional tags, unquoted attributes and significant whitespace

The spec allows omitting several end tags (`</li>`, `</p>`, `</td>`, the entire `<tbody>`) and the quotes around any attribute whose value contains no space, double quote, single quote, `=`, `<`, `>` or backtick, and aggressive minifiers exploit both. What they must not do is collapse every space: between two inline elements `</span> <span>` renders a visible space, and removing it glues the words together. `<pre>` and `<textarea>` keep literal whitespace, with one parser exception — a newline immediately after the start tag is discarded. This is why minified HTML typically shrinks only 10% to 20%, far less than CSS or JavaScript.

// Architecture & best practices

❓ Frequently asked questions about HTML

Is more than one `<h1>` per page a mistake?

Not per the specification: every `<section>` may carry its own `<h1>`. The practical problem is that the outline algorithm meant to recompute heading levels was never implemented and has been dropped from the standard, so screen readers and crawlers read the literal tag number. Skipping from `<h2>` to `<h4>` does break heading navigation.

Why does my layout shift after I pretty-print the HTML?

Because whitespace between inline elements is rendered. When a formatter turns `<span>a</span><span>b</span>` into two indented lines, a space appears between them, and in an `inline-block` row that indentation adds roughly 4px gaps. The usual fix is `display: flex` on the container instead of fighting the line breaks.

When do I use `&amp;` and when `%26` in a URL?

They belong to different layers. `&amp;` is markup escaping: in `href="/search?a=1&amp;b=2"` the browser hands the URL over with a plain `&`, and leaving it unescaped is risky because sequences such as `&copy=` are parsed as a character reference. `%26` is percent-encoding and is required when the `&` is part of a parameter value, as in `?company=Ruiz%20%26%20Sons`.

Related web and SEO tools