HTML formatter

Format HTML source while preserving whitespace-sensitive content.

Processed on your device

Input

Open a local UTF-8 text file5 MiB maximum. The file opens in the text box above.Or drop a file here.

Options

Options

How to use this tool

  1. Format HTML source while preserving whitespace-sensitive content.
  2. Adjust the labelled settings, then run the tool. Copy the result or download it as a file.

Things to know

  • Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
  • Compact mode removes comments and collapses ordinary text whitespace while preserving inline spaces and pre, textarea, script and style contents.
  • Source: 2 MiB, 50,000 nodes, 128 nesting levels, 256 attributes per element and 100,000 total attributes. Formatting expansion is estimated before parsing. Compact output preserves whitespace-sensitive elements.

You might also need

More in web development