CSS & HTML Beautifier

Paste HTML or CSS — it formats as you type. Auto-detects language, numbers lines, highlights syntax on input and output, validates markup, and supports Format, Lines, and Minify modes.

detected: {{effectiveMode.toUpperCase()}}

Input

{{ num }} Line {{ num }}: {{ errorMap[num].message }}
Waiting for input… ✓ Valid {{ effectiveMode.toUpperCase() }} ✕ {{ validationSummary }}
Output
Indent
{{human(origSize)}}{{human(outSize)}} · {{deltaLabel}} · {{outLineCount}} lines
{{ num }}

About this tool

Parses HTML or CSS into a lightweight tree with live syntax highlighting, gutter line numbering, and markup validation. Safely preserves dynamic template expressions (like Shopify/Liquid {{ ... }} and {% ... %}) and nested at-rules like @media, then re-renders according to your chosen action:

Content inside <pre>, <textarea>, <script>, <style> and <code> is preserved verbatim, and the syntax validator inspects for mismatched tags, unclosed braces/parentheses and duplicate attributes.

Parsing, validation and formatting happen entirely in your browser. Nothing you paste is uploaded.