XML Formatter
Reindent XML so nesting is readable, or minify it back down to a single line.
Input
Output
Reindenting and checking structure
The formatter reindents elements so nesting is visible, and the minifier strips whitespace and comments back out for transport.
The validator is a structural check: it verifies that every tag is closed and correctly nested and reports the line where that breaks. It does not validate against a DTD or an XSD schema.
Frequently asked questions
Does it validate against a schema?
No. It checks well-formedness — balanced, correctly nested tags — which is what catches the overwhelming majority of hand-edited XML problems.
Are attributes and CDATA preserved?
Yes. Only whitespace between elements is changed; attribute values, CDATA sections and processing instructions are left untouched.
Related tools
XML ValidatorCheck that XML tags are balanced and correctly nested, and get the line where the structure breaks.JSON FormatterPretty-print JSON with your choice of indentation, optionally sorting keys so two payloads can be compared.JSON MinifierStrip every unnecessary space and newline from JSON, and see how many bytes that saves.JSON ValidatorCheck whether JSON is valid and get the exact line and column of the first error, not just "unexpected token".JSON Viewer & Path ExplorerFlatten JSON into dotted paths so you can find the value you need and copy the exact path to it.JSON ↔ CSV ConverterTurn an array of JSON objects into a spreadsheet-ready CSV and back, handling quoted fields and embedded commas properly.