Text and dataRuns in your browser

XML Formatter and Validator

Check matching tags, quoted attributes, entities, and a single root element, then produce a bounded formatted document.

  • Well-formedness
  • DTD/ENTITY disabled
  • Mixed content preserved
Online tool

Try the tool

Add your data, choose the settings, and get the result.

XML document

Result

Run the XML validation.

Your data stays here

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Paste XML and choose the indentation size.

  2. 2

    Run validation and formatting.

  3. 3

    Fix structural errors or copy the result.

02

What the tool can do

  • Start/end/self-closing tags, quoted attributes, and duplicate-attribute detection.
  • XML comments, CDATA, and processing instructions.
  • Predefined and numeric entity references without custom entity expansion.
  • Formatting of structural content while mixed content remains compact.
03

Common use cases

  • Checking an API payload, feed, or configuration XML.
  • Finding mismatched tags and duplicate attributes.
  • Preparing a readable copy of a small XML document.
04

How it works inside

Input is limited to 500,000 characters, 10,000 nodes, and depth 64.

The formatter does not inject indentation inside mixed content so significant text is not changed.

05

Questions and answers

Is XML validated against XSD?

No. The tool checks bounded well-formedness and formatting, not schema conformance.

Are external entities resolved?

No. DTD and ENTITY declarations are rejected before parsing, so XXE-style resolution is not performed.