HTML Formatter
Runs in your browserIndent tangled markup so you can read it, or strip comments and whitespace to ship it. Nothing you paste is uploaded.
Input
Output
Formatting…
How this one works
Beautify puts each block element on its own line and indents children inside their parents, so the structure of a page is visible at a glance. Inline elements such as links and <strong> stay in the flow of their text.
Minify removes comments and collapses the whitespace between tags, which browsers ignore anyway. The contents of <pre>, <textarea>, <script> and <style> are left exactly as they are, because whitespace there does matter.
Questions
- Will minifying change how my page looks?
- It shouldn’t. Whitespace between tags doesn’t render, and whitespace inside text is collapsed to a single space — exactly what the browser does when it displays it. Preformatted blocks, scripts and styles are left untouched.
- Does it minify the CSS and JavaScript inside the page too?
- No — inline <style> and <script> contents are preserved as written, so nothing inside them can break. Use the CSS Formatter or JavaScript Formatter to minify those separately.
- Is my HTML uploaded anywhere?
- No. Formatting runs as JavaScript in your browser tab. Nothing is sent to a server, and nothing is stored after you close the page.