Skip to content

HTML Formatter

Format HTML source with Prettier while preserving its parser’s whitespace semantics.

Input

39 chars1 lines

Result

Type or paste on the left — the result updates as you type.

Does not preview or execute HTML. This is formatting, not HTML sanitization or validation against every browser.

Up to 100,000 UTF-16 units per input and 1,000,000 per result. See the supported formats and examples below.

Format references

Tool page updated: