HTML Prettifier

Format and sanitize HTML markup with DOMPurify — nothing leaves your browser.

Privacy: 100% Client-Side. Your data never leaves this browser tab. Processing uses Web APIs and client-side libraries only.
<div class="card">
  <h1 onclick="alert(1)">Hello</h1>
    <script>evil()</script>
      <p>Utilxo</p>
    </div>

What does the HTML prettifier do?

Messy or untrusted HTML is hard to read and unsafe to render. Formatting helps debugging; sanitizing helps strip dangerous markup.

This tool prettifies and sanitizes HTML locally with DOMPurify so markup never needs to be uploaded.

How to use this tool

  1. Paste HTML into the editor.
  2. Prettify for readability and/or sanitize with DOMPurify.
  3. Copy the cleaned markup back into your app or email template.

Frequently asked questions

Is HTML uploaded?

No. Formatting and sanitization run 100% in the browser.