Code tools
HTML Formatter
Format HTML (HyperText Markup Language) as text. Scripts, links and images remain inactive.
Runs locallyRuns locally in your browser
Guide
Format an HTML (HyperText Markup Language) document or fragment into readable source. Tags, links and scripts stay text, so you can inspect the markup without opening resources or running embedded code.
- Add your document
Paste into Input, choose an example or use Open file. You can also drop one local text file into Input.
- Choose and run
Choosing an example shows the result immediately. When you type or change an option, Output updates after a short pause. Format runs immediately. Where available, Minify keeps the result compact as you continue typing.
- Read and keep the result
Read Output. On a phone, select the Output tab. Use Copy output or Download to keep the result. Clear removes both fields.
On mobile, choose Output to read the result. Clear removes both fields.
Indent
- 2 spaces: use two spaces for each indentation level.
- 4 spaces: use four spaces for each indentation level.
- Tab: use a tab character for each indentation level.
Shortcuts
- Ctrl / Cmd + Enter — Run selected action
- Ctrl / Cmd + Shift + C — Copy output
- Ctrl / Cmd + S — Download output
- ? — Show shortcuts outside text fields
Shortcuts work while focus is in the workspace. Copy and download need valid output.
Common questions
- Does this run my code?
- No. Code is parsed and rewritten locally, never executed. Markup stays text; links, scripts and images are not opened.
- Is my document saved or uploaded?
- No. Input, results, root names and filenames stay in this tab and are not remembered between visits. Only safe language and formatting choices may be stored on this device.
- What are the limits?
- Input is limited to 1 MB and output to 2 MB. Processing stops after five seconds. Type generation also allows up to 100 nesting levels and 10,000 values including containers. Large results use a preview; Download keeps the full successful output.
- What does this check?
- This is a formatter, not a sanitizer. It preserves source as text here; review untrusted markup before using it on a website. Whitespace-sensitive elements are preserved.
Was this tool helpful?
Only your rating and optional feedback are sent. Your tool input and output are never included.