XML -> FORMATTED · Local tool
XML formatter
Format, beautify and validate XML, with real error positions.
Last updated
How do I format and validate XML without uploading the file?
Paste XML into filetity's formatter and it is parsed in your browser tab, then printed back with the indentation you choose. Nothing is uploaded, because there is no server to upload it to. The XML someone needs formatted is usually an API response, an invoice or a config file from work. A broken document gets the line and column that broke it rather than the word invalid on its own. What gets checked is whether the XML is well-formed: every tag closes, tags nest in the right order, and special characters are escaped. Comments, CDATA, the XML declaration and a DOCTYPE all pass through as written.
01 / Your device
the file stays here
02 / Browser memory
the work runs locally
03 / Back to you
saved on this device
When you would use this
Situations, not settings.
- A feed or config that arrived unindented
- Nesting is the whole meaning of XML and minified XML hides it.
- XML a parser rejects
- You get the line and column that broke it, not just the word invalid.
- An SVG or a sitemap you are editing by hand
- Both are XML, and both are much easier to work on formatted.
How it works / no cloud
A conversion engine, not an upload form.
filetity parses the XML in your browser with its own tokenizer, checks that every tag closes and closes in the right order, and prints it back with the indentation you chose. Nothing is sent anywhere, which is the point when the XML is an API response or a config file from work.
- Offline ready
- Installable app
- No file limit queue
Straight answers
No accordion. Nothing hidden.
- Is it free?
- Yes, with no watermark and no page limit.
- Does it need an account?
- No. There is no account system.
- Is my file processed on my device?
- Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- What formats are supported?
- XML in, including declarations, DOCTYPE, comments and CDATA. Formatted XML out, or minified.
- What are the limits?
- Formats and validates that the document is well-formed. It does not check against a DTD or an XSD schema.
- Does it work on mobile?
- Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Does it work offline?
- Yes, after you have used it once. Your browser keeps what the tool needs, so it then works with no network connection.
- Is my XML uploaded to a server?
- No. The parser runs in your browser and there is no server to send it to. That matters here more than on most tools, because the XML people need formatted is usually an API response, an invoice or a config file they are not allowed to paste into a random website.
- What does 'well-formed' mean, and is it the same as valid?
- Well-formed means the syntax is right: every tag closes, they nest in the right order, and the special characters are escaped. Valid means it also matches a schema that says which elements are allowed where. This page checks the first, which is what catches almost every real error.
- Why does it say the line and column?
- Because the reason anyone opens a formatter with broken XML is to find the character that broke it. A message saying only 'invalid' sends you back to reading the file by eye.
- Can it minify as well as beautify?
- Yes. Choose Minified as the indent and the whole document comes back on one line, which is what you want before putting XML into a request body or a config value.
- Are comments, CDATA and the XML declaration kept?
- Yes, all three, along with a DOCTYPE. They are passed through as written, on their own line at the current indent, and the contents of a CDATA section are never touched, so a < inside one is not read as a tag.
Keep working locally
7 available · more coming
- JSON Formatter and ValidatorFormat, beautify, validate and read JSON, and find the line that broke it.
- HTML formatterBeautify minified or messy HTML into something readable.
- JSON diffCompare two JSON documents and see exactly what differs.
- XML to JSONConvert XML to JSON, with attributes, namespaces and repeated elements handled.
- JSON to XMLConvert JSON to indented XML, with attributes and arrays handled.
- Receipt ScannerRead merchant, date, total and tax off photos of receipts into one CSV, every field a guess you can check.