Developer tools

XML formatter

Make XML readable locally, preserve mixed text and xml:space sections, find syntax errors, and download a UTF-8 result.

Indentation changes whitespace between child elements. Choose Keep all whitespace when those spaces matter to your application.

Paste XML or import one UTF-8 file up to 1 MiB.

Source: editor text.

Import an XML file or drop it here

Choose whitespace handling and format when ready.

Readable XML without breaking mixed text

Two spaces, four spaces or tabs indent containers whose children are markup and ordinary whitespace. Sections containing text alongside elements, CDATA, or xml:space="preserve" stay as entered, including their descendants. Whitespace-only leaf elements also stay intact. Names, namespace prefixes, attribute order, quote choices, entity spelling, comments and processing instructions are retained.

Adding indentation still changes XML text nodes. It can affect an application even if a container looks like data-only XML. Keep all whitespace checks the document while retaining source spacing; turn off Ensure a final newline to avoid adding one. This tool does not perform XML canonicalization or preserve digital signatures. Keep the original file for signature-sensitive workflows.

Correct errors with your input preserved

Errors identify a line and UTF-16 column and focus the source position. Your original editor remains available. Import, example, clear, large paste and Use output as input support one Undo replacement, restoring the saved source, indentation, final-newline choice, wrapping and filename. Edits cancel obsolete work and invalidate old output. Copy has a manual selection fallback.

Supported XML and local processing

Use one XML 1.0 document with a single root element. If an encoding is declared, it must be UTF-8, matching the downloaded file. Files are decoded strictly as UTF-8. A leading byte-order mark is removed with a notice. Imported text retains original line endings for processing, copy and download until you edit. The browser editor displays normalized LF line breaks; editing uses LF. Keep all whitespace with Ensure a final newline off preserves imported source whitespace, apart from removing a leading BOM.

DOCTYPE, DTDs and custom entities are not supported. The five predefined entities and valid numeric character references are accepted. This is a syntax and formatting check, not DTD or XML Schema validation. SVG input is treated as XML text and is never rendered or executed; processing instructions are never run.

Files remain on your device. A local worker has a ten-second deadline and can be cancelled. Input is limited to 1 MiB, output to 4 MiB, depth to 100 elements and the parsed structure to 50,000 nodes. No automatic storage or upload. Whitespace reference: W3C XML 1.0.