XML formatter
Format, minify and validate XML, with the line number of the first problem.
Missing a feature or found a bug in XML formatter? Tell me on X (@_andrewtran) or by email.
How to use XML formatter
- Paste your XML in the input pane.
- Choose 2 spaces, 4 spaces or Minify.
- Copy the result or download it as a file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
What does it check?
That the XML is well-formed: every tag closed and matched, attributes quoted, one root element. It does not check the document against a schema or DTD.
Is my content changed?
Only the spacing between tags. Text, attributes, comments and CDATA sections are kept as they are.
Related tools
CSV to SQL converter
Turn CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL and more.JSON to SQL converter
Turn a JSON list of objects into SQL INSERT statements, with an optional CREATE TABLE.JWT generator
Sign a JSON payload as a JWT with a secret (HS256) or a private key (RS256, ES256, EdDSA and more).2FA code generator
Generate time-based one-time codes (TOTP) from a secret or an otpauth:// link, to test sign-in flows.