Validate XML safely, preserving the original document

The validator checks XML 1.0 structure, namespaced attributes and entity references locally. It returns the original document byte for byte, rather than inserting indentation that might change text nodes.

What this tool actually does

Format & validate XML parses the content as structured data or text before generating the output. JSON, XML, CSV, TSV, Markdown and damaged text are not treated as arbitrary strings where changing a filename would be enough.

How the result is verified

Whenever the format allows it, the generated result is parsed or validated again. Quoted fields, delimiters, XML/JSON structure and text encoding are handled with format-specific checks to reduce outputs that look plausible but cannot be read correctly by the next application.

Limits and fidelity

Limits protect the browser from disproportionate files, rows, columns or cell sizes. The conversion preserves information the destination can represent but does not invent types, relationships or meaning missing from the source. Review critical datasets before replacing the original.

When to use this workflow

Use this workflow when a system requires another representation of the same data, when syntax needs validation or when text displays broken characters. For legal, financial or production-critical information, keep the original and compare a representative sample before relying on the transformed file.

Privacy and final verification

Keep the original file until the output has been reviewed in the destination application or portal. Supported workflows process locally in the browser and enforce bounded size and complexity limits. For Format & validate XML, verify that the generated format preserves the properties that matter for your use case. For important data, compare a representative sample and confirm that format, content and quality meet the actual requirement before replacing the source file. Also open the generated file in the destination application when compatibility, colour, transparency, layout or compression matters.

Why indentation can corrupt XML

In <root><item> </item></root>, the two spaces inside item are text. Replacing them with a newline and indentation changes the value. Even <root><a/><b/></root> gains new whitespace text nodes when pretty-printed without a schema. The validator therefore leaves the downloaded XML unchanged.

What is checked

It checks matching tags, one root, quoted attributes, duplicate attributes, namespace declarations, invalid entity references and XML 1.0 character rules. DOCTYPE and external entities are rejected, not fetched. The XML declaration must specify UTF-8 if it declares an encoding.

How to verify the result

Upload a UTF-8 XML file, validate it, then compare the downloaded file byte for byte with the original. BOM, CRLF, tabs, CDATA and whitespace-only nodes remain identical. For applications requiring pretty printing, use a schema-aware XML editor and review whitespace semantics.

Limits and related conversions

The local tool accepts up to 10 MB of UTF-8 input and 12 million decoded characters; it does not validate against a DTD or XSD. If a structural conversion is appropriate, try XML to JSON or JSON to XML, which have stricter mapping limitations.