WebToolsForAll

Tools / Formatters & Beautifiers

HTML formatting and inert preview

Format markup, inspect structure or preview a sanitized inert document.

Input

0 UTF-16 code units

Inputs start empty. Load example fills them only when you choose it. Reset clears current inputs and results.

Import a local text file

Output

More options: print and local draft
Optional local draft

Saving stores a plaintext draft in this browser on this device. Do not save secrets or use this on a shared device. Nothing is saved or loaded automatically. Reset does not delete a saved draft; use Delete local draft.

No draft has been loaded.

Work through the task

Format markup, check structure, inspect an inert preview or translate the static Pug subset.

  1. Choose the edit, preview or template action explicitly.
  2. Formatting retains source text; minification can collapse ordinary whitespace and warns that rendering can change. Preformatted and textarea text remain significant.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

<main><p>Hello</p></main> converts to a static Pug main line with an indented p Hello line.

Limits and output behavior

Maximum 100,000 input characters, 10,000 markup tokens and 40 nesting levels. Structural checking is a bounded explicit-tag subset, not full HTML5 validation or browser recovery. Static Pug excludes code, includes, interpolation, mixins and template control flow. Preview removes network resources and active content and remains inside an empty sandbox. It is not a reusable sanitizer for another website.

Troubleshooting

Check explicit-tag nesting or the static Pug subset for the selected action. Formatting/minification are separate choices; unsupported template expressions do not execute.

Questions

Is the inert preview a sanitizer for another website?

No. It is a restricted empty-sandbox view with active/network content removed. Reusing the original HTML in another context needs its own security treatment.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.