Code Formatters & Validators
Tools for formatting, validating and comparing structured data. All processing happens in your browser, so your data is never uploaded.
- XML FormatterPaste XML to indent it readably or collapse it to one line, and to check that it is well formed. Errors point at the exact line and column. Everything runs in your browser, so nothing is uploaded.
- YAML ValidatorPaste YAML to check it and convert it to JSON, or switch direction to turn JSON back into YAML. Errors report the exact line and column. Everything is parsed in your browser, so manifests carrying secrets are never uploaded.
- JSON FormatterPaste JSON to indent it readably and check that it parses, with the line and column of any error and a collapsible tree for finding your way around an unfamiliar response.
- JSON ComparePaste two JSON documents to see every added, removed and changed value listed by path. Key order is ignored, so only real differences are reported.
- JSON StringifyTurn a JSON document into an escaped string you can paste into code, or reverse an escaped string back into readable JSON.
Choose a formatting tool
Use the JSON formatter for indenting, minifying and exploring a payload, the compare tool when two responses should be identical and are not, and the stringify tool when a document has to be embedded inside another one as a string.
Use the YAML validator for configuration files, where the interesting failures are indentation and implicit typing rather than syntax, and the XML formatter for documents and SOAP payloads, where mixed content means whitespace is sometimes part of the data.
Real parsers, not regular expressions
Every tool in this category parses the document properly before it prints anything, which is what lets it point at the line and column where the input stopped being valid instead of reporting that something, somewhere, is wrong. It is also why a document that formats cleanly here will load in your own language's parser.
The trade is strictness. These parsers follow the specifications rather than the lenient behaviour some libraries add, so a trailing comma, a tab used for indentation or an unescaped ampersand is an error here even where a particular tool in your stack would have accepted it.
Formatting rewrites bytes, not meaning - with exceptions
Indenting a document parses it and writes it out again, and a few things are normalised on that trip. In JSON, duplicate keys collapse and very large integers lose precision. In YAML, anchors are resolved and comments disappear on conversion. In XML, attribute order and comments survive, but whitespace inside mixed content is data and is deliberately left alone.
None of that matters for reading a payload in a debugger. It matters a great deal if the formatted output is what you commit, so when a document is the source of truth, format a copy and diff it against the original before replacing anything.
Which format belongs where
JSON is the interchange default: no comments, no ambiguity about types, parsers everywhere. YAML earns its place in configuration, where comments and reuse matter and a human edits the file by hand. XML persists where schemas, namespaces and signatures are part of the contract, which is most of enterprise and government integration.
Converting between them is rarely free. JSON gains nothing from YAML's anchors and loses its comments; XML attributes have no obvious JSON equivalent, and every converter invents its own convention. Convert when a system on the other end requires it, not to tidy a file up.
