Make a block of XML readable
An API answers with a single line of tags, a config file lost its indentation, an export is half a megabyte of angle brackets. Paste it here and the nested structure appears: every child indented one level under its parent, text-only elements on one line, and the XML declaration, comments, CDATA sections and processing instructions kept where they were.
Format, minify or check in four steps
- Paste the XML into the left box. A small order file is there as an example.
- Leave Format selected to indent it, or switch to Minify to squeeze it into one line.
- Pick two spaces, four spaces or a tab, and tick Remove comments if you want them gone.
- Read the status line. A green message means the document is well-formed. Otherwise it names the problem and the line and column.
- Press Copy or download the result as a .xml file.
What counts as valid
The check is done by your browser's own XML parser, so the rules are the standard ones: one root element, every tag closed in the right order, attribute values in quotes, special characters such as & and < written as entities, and no undefined entities. HTML that happens to look like XML often fails here, for example a <br> without a closing slash.
How whitespace is handled
Formatting adds whitespace between tags, which a parser ignores in data files. Where text and tags are mixed, as in a paragraph with a bold word, spaces are part of the content, so the tool leaves that element exactly as written. Text that stands alone between tags is trimmed. If your format treats whitespace as meaningful, compare the result against the original first.
The file never leaves your device
Parsing and formatting run in your browser. Invoices, configuration files and API responses are not uploaded.