Beautify and indent SQL, HTML, CSS, JavaScript, XML and YAML. Powered by Prettier and dialect-aware parsers, running entirely client-side.
6 tools in this category.
Format SQL for eleven dialects with proper keyword casing, indentation and clause breaks.
Indent and tidy HTML with Prettier, including embedded <style> and <script> blocks.
Expand and tidy stylesheets with consistent indentation and spacing.
Format JavaScript and JSX with Prettier — the same engine your editor uses, with no install.
Indent and validate XML while preserving document order, attributes and comments.
Normalise YAML indentation and flow style, validate syntax, and optionally resolve anchors.
Six formatters covering SQL, HTML, CSS, JavaScript, XML and YAML. The JavaScript, CSS and HTML formatters run Prettier — the same engine as your editor, so output matches what your project would produce rather than approximating it. SQL uses a dialect-aware parser, which matters more than it sounds: the same statement formats differently in PostgreSQL, MySQL and T-SQL, and a formatter that ignores the dialect will mangle quoted identifiers and vendor-specific syntax.
Formatting is not cosmetic. Consistent layout is what makes a diff show the change you made rather than a reflow of everything around it, and it is what lets you see at a glance that an `AND` binds to the wrong branch of a `WHERE` clause. The most common real use for a formatter is not tidying your own code but making someone else's readable — a minified vendor script, a generated SQL query pulled from a slow-query log, an XML payload from a SOAP endpoint that arrived on one line.
YAML deserves particular care and gets it here. Indentation is syntax in YAML, so a formatter that guesses wrong does not produce ugly output, it produces different data. The formatter preserves structure and normalises only what is genuinely insignificant.