Text & Developer Tools
Code Formatter
Format or minify HTML, XML, CSS, and SQL with predictable indentation.
Code is formatted locally in your browser. Nothing is uploaded or executed.
Code formatter
Format HTML, XML, CSS, or SQL with predictable indentation. The formatter is opinionated, not a validator.
What the formatter does
HTML and XML use a tag-aware tokenizer that preserves text, attributes, comments, and raw script or style content. CSS uses a brace-aware scanner. SQL applies keyword casing and clause line breaks; it is not a full SQL parser.
The tool does not execute code or send it anywhere. Formatting does not guarantee that the input is valid.