Your data is never sent to a server or stored anywhere. All processing happens in your browser.

HTML Formatter

Indent
Formatted output
 

How to Use


Paste HTML and the tool indents according to tag nesting, putting each element on its own line. Choose 2- or 4-space indent.

Formatting Rules


The tool tracks open/close tags to determine indent depth and emits each tag on its own line. Void elements (`<br>`, `<img>`, etc.) are handled without expecting a close tag, and the inner contents of `<pre>`, `<script>`, `<style>`, and `<textarea>` are preserved verbatim. It's not a full HTML parser, so unusual attribute values or non-standard tags may produce slightly off results.

Use Cases


  • Decoding bundler-output or server-rendered minified HTML
  • Tidying up HTML snippets before posting to a blog or chat
  • Inspecting HTML copied from DevTools locally
  • Cleaning up template-engine output (EJS, Handlebars, etc.)
  • Reviewing the structure of an email HTML body

Privacy


Formatting happens entirely in the browser. The HTML never leaves your device, so internal templates or content that contains personal data stays local.