Code Formatters and Validators
Make code readable, or check that it is correct. The formatters take minified, inconsistently indented or machine-generated JavaScript, CSS and HTML and lay it out cleanly, or compress it for production. The validators parse a document and report what is wrong, where, and what the spec says instead.
Search results
No tool matches that. Try a shorter word.
Every Formatters & Validators tool
CSS Formatter
Expand minified CSS to one declaration per line, or minify it back.
CSS Validator
Find typos, missing semicolons and unknown properties in pasted CSS.
Email Validator
Check a list of email addresses for syntax errors and likely typos.
HTML Formatter
Indent messy HTML or collapse it safely, keeping pre and script intact.
HTML Validator
Find unclosed tags, duplicate ids and bad nesting in pasted HTML.
Indent Code
Shift every line right by a set number of spaces or tabs.
JavaScript Formatter
Expand minified JavaScript into indented code, or squash it back.
SVG Validator
Find unclosed tags, bad path data and broken references in SVG.
URL Validator
Check a list of URLs for syntax errors, one per line.
Unindent Code
Remove common or fixed indentation from a block of code.
Formatting
The JavaScript, CSS and HTML formatters each offer the same two operations: beautify and minify. Beautify applies consistent indentation, line breaks and spacing, with the indent size and brace style as options; it is the fastest way to read a minified bundle or a stylesheet someone exported from a builder. Minify strips whitespace and comments to reduce file size for delivery. The tools do not rewrite logic or rename identifiers, so what comes out behaves exactly as what went in.
Validating markup
The HTML validator parses a document the way a browser does and lists structural problems — unclosed elements, misnested tags, duplicate IDs, attributes that do not exist on that element, missing alt and lang. The CSS validator reports unknown properties, invalid values and syntax errors with line numbers, and distinguishes real errors from vendor prefixes and newer properties it recognises. The SVG validator checks an SVG file's structure and attributes, flags elements and script that will not survive being used as an image, and points out the common export artefacts from design tools.
Validating strings
The URL validator parses an address into scheme, host, port, path, query and fragment, tells you whether it is well-formed and highlights the part that is not. The email validator checks an address against the actual syntax rules rather than a rough pattern, explains what failed, and optionally checks that the domain has mail records, since a syntactically perfect address for a domain with no MX record will still bounce.
Why in the browser
Code you are formatting is often unreleased, and markup you are validating often contains customer content. None of it is uploaded; parsing happens on your machine, apart from the optional MX lookup in the email validator, which sends only the domain name to a public resolver and nothing else.