XML Formatter

Format XML with explicit control over meaningful whitespace.

Data & Formats
Preparing your workspace…
Input
Output
Your result will appear here.

How to use

  1. Paste your data or open a UTF-8 text file; try the sample to see the expected input.
  2. Choose the options and run the tool, or enable automatic conversion.
  3. Review the result, then copy the selection, copy everything or download a file.

XML Formatter

Format XML with explicit control over meaningful whitespace.

Comparison, parsing and formatting run in your browser. Your input is not sent to DevToolsy.

How it works

Validate well-formed XML, including matching tags, attributes and namespaces, before formatting. Preserve text whitespace by default; strict mode keeps all content whitespace, while reindent mode explicitly allows whitespace changes.

Before and after
Input
<project><name>DevToolsy</name><active>true</active></project>
Result
<project>
  <name>DevToolsy</name>
  <active>true</active>
</project>

Format XML with explicit control over meaningful whitespace.

Options and data fidelity

Comments and CDATA remain markup, never executed page content. DTDs and external entities are not supported. This tool checks XML syntax, not XSD schemas.

Working with the result

Files are read as UTF-8 text. The editors provide search, selection copying and keyboard shortcuts. Results can be copied or downloaded; changing the input invalidates the previous result.

Processing limits

UTF-8 input up to 1 MiB per document; output up to 8 MiB. Tasks run in a local worker with a 30-second time limit.

Further readingXML 1.0
?

Frequently asked questions

What does XML formatting check?

Validate well-formed XML, including matching tags, attributes and namespaces, before formatting. Preserve text whitespace by default; strict mode keeps all content whitespace, while reindent mode explicitly allows whitespace changes.

How are whitespace, CDATA and DTDs handled?

Comments and CDATA remain markup, never executed page content. DTDs and external entities are not supported. This tool checks XML syntax, not XSD schemas.

Is my input uploaded?

No. Comparison, parsing and formatting run in your browser. Your input is not sent to DevToolsy.

Can I open a local file?

Yes. Open a UTF-8 text file of up to 1 MiB. Each comparison input has its own file picker.

Can I copy only part of the result?

Yes. Select text in an editor and use Copy selection, or use the standard keyboard shortcut.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.