--- title: "XML, YAML, SQL and CSS formatter — free, runs in your browser" description: "Pretty-print and minify XML, YAML, SQL, CSS and HTML. Free, no sign-up, and nothing you enter leaves your browser." url: https://atoneplace.net/tools/code-formatter/ site: "At One Place" --- # XML, YAML, SQL and CSS formatter Pretty-print and minify XML, YAML, SQL, CSS and HTML. ## How it works Formats and minifies XML, SQL, CSS and HTML, and reformats YAML indentation. Everything runs in your browser. These are structural formatters rather than full parsers, which is worth knowing about their limits. The XML formatter re-indents well-formed markup and reports where it becomes unbalanced, but it does not validate against a schema. The SQL formatter breaks on keywords and indents subqueries, which handles ordinary statements well and will not perfectly lay out an unusual dialect. CSS minification here removes comments, whitespace and the last semicolon in a block. It deliberately does not merge or reorder rules, because CSS is order-dependent and a minifier that reorders declarations can silently change which rule wins. For anything going into production, a proper build-time tool is the right answer. This is for reading something you were handed. > This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected. ## Common questions ### Does this validate my XML? It checks that tags balance and reports where they do not. It does not validate against a DTD or schema. ### Is it safe to minify CSS this way? For whitespace and comments, yes. It deliberately does not merge or reorder rules, because CSS is order-dependent and reordering can change which declaration wins. ## Related pages - [Word and character counter](https://atoneplace.net/tools/word-counter/) - [Typing speed test](https://atoneplace.net/tools/typing-speed-test/) - [Remove duplicate lines](https://atoneplace.net/tools/remove-duplicate-lines/) - [Sort lines alphabetically](https://atoneplace.net/tools/sort-lines/) - [JSON formatter and validator](https://atoneplace.net/tools/json-formatter/) - [Text compare](https://atoneplace.net/tools/text-diff/) - [Regex tester](https://atoneplace.net/tools/regex-tester/) - [Case converter](https://atoneplace.net/tools/case-converter/) - [Remove empty lines](https://atoneplace.net/tools/remove-empty-lines/) - [Find and replace](https://atoneplace.net/tools/find-and-replace/) ## Sources - Calculated on this page — At One Place (/about/)