nrtechstudio.com

Free Online XML Validator — Check XML, Validate Against XSD & DTD

Paste your XML to check well-formedness, validate it against an XSD schema, or validate it against a DTD — with precise line & column errors you can click to jump to. Includes an XML formatter/beautifier. A real XSD 1.0 engine runs entirely in your browser: no upload, no signup, works offline.

🔒 100% private: your XML, XSD and DTD are processed locally in your browser. This page makes zero network requests — nothing you paste ever leaves your device.

XML document — paste, drop a file, or pick one

XSD schema — for “Validate against XSD”

DTD — for “Validate against DTD” (or use a DOCTYPE internal subset)

Results will appear here.

How to use this XML validator

  1. Check syntax: paste XML and click Check well-formedness — the strict parser reports mismatched tags, unclosed elements, duplicate attributes and illegal characters with exact line/column.
  2. Validate against XSD: paste your schema, click Validate against XSD — every violation shows the element path (e.g. /invoice/items/item/price) plus line/column. Click an error to jump to it.
  3. Validate against DTD: paste a DTD (or rely on the DOCTYPE internal subset in your XML) and click Validate against DTD.
  4. Format: click Pretty-print to beautify minified XML, then copy or download the result.

Well-formed vs. valid — what's the difference?

Well-formed XML obeys the basic syntax rules: every start tag has a matching end tag, attributes are quoted, there is exactly one root element, and special characters are escaped. Valid XML goes further: it is well-formed and conforms to a schema (XSD) or DTD that defines the allowed elements, their order, attributes and data types. This tool checks both levels — most free XML checkers online only do the first.

Validate XML against XSD online (real XSD 1.0 engine)

Unlike generic XML tester sites, this page compiles your schema with a hand-rolled XSD 1.0 validator — not a regex hack. Supported:

Honest limits (disclosed, not silently ignored): xs:key/keyref/unique, xs:include/xs:import (multi-file schemas — inline them first), and external schema locations are not supported. The validation logic is cross-checked against libxml2 semantics.

XML DTD validator online

Paste a DTD to validate element content models (EMPTY, ANY, #PCDATA, sequences, choices, ?/*/+), ATTLIST declarations (#REQUIRED, #IMPLIED, #FIXED, enumerations), and ID/IDREF integrity. External DTDs (SYSTEM/PUBLIC) are not fetched — this tool is offline by design; paste the DTD text instead.

XML formatter & beautifier

Minified XML is unreadable — the pretty-printer re-indents it with 2 or 4 spaces. Mixed content (text interleaved with elements, common in document-style XML) is deliberately kept inline so formatting never corrupts your data.

For Linux users: a friendlier xmllint

If you normally reach for xmllint --noout file.xml or xmllint --schema schema.xsd file.xml on Linux, this tool gives you the same verdicts with clickable errors in a browser — handy on machines where you can't install libxml2, or when you want to validate a snippet without touching the terminal.

Common use cases

How this compares

ToolXSD validationDTD validationError precisionPrivacy
nrtechstudio XML Validator (this page)Full XSD 1.0 subset, hand-rolled engineYes (internal subset)Path + line + column, click-to-jump100% client-side, zero requests
codebeautify.org/xmlvalidatorBasic XSD supportLimitedLine numbersServer-side processing
xmlvalidation.comYesYesBasic messagesServer-side processing
xmllint (CLI)Yes (libxml2)YesTerminal outputLocal (requires install)

Comparison as of October 2026, based on publicly documented features.

Frequently asked questions

How do I validate XML against an XSD online?

Paste your XML document and your XSD schema into the two boxes above, then click “Validate against XSD”. The tool compiles the schema in your browser and reports every mismatch with a precise path, line and column — no upload, no signup.

What is the difference between well-formed and valid XML?

Well-formed XML follows the basic syntax rules (matching tags, quoted attributes, one root element). Valid XML is well-formed and conforms to a schema (XSD) or DTD that defines which elements, attributes and data types are allowed.

Can I validate XML against a DTD online?

Yes. Paste your DTD into the DTD box (or include an internal subset in a DOCTYPE declaration) and click “Validate against DTD”. The tool checks element content models, required attributes, enumerations, and ID/IDREF integrity.

Does this XML validator support multiple XSD files?

The tool validates against a single pasted XSD document. xs:include and xs:import (multi-file schemas) are not supported — inline all definitions into one schema before validating.

Is there a Linux command-line alternative to online XML validators?

Yes — xmllint from libxml2 (xmllint --noout file.xml for well-formedness, xmllint --schema schema.xsd file.xml for validation). This web tool is a convenient alternative when you want instant feedback in a browser without installing anything.

Can I validate large XML files online?

Yes. The tool parses files locally in your browser (use the file picker or drag & drop), so even multi-megabyte documents validate without uploading anything to a server.

How do I fix XML validation errors?

Click any error's line/column button to jump straight to the problem. Common fixes: closing mismatched tags, adding missing required elements or attributes, correcting element order to match xs:sequence, and fixing data types (dates, numbers).

What XSD features are supported?

xs:sequence, xs:choice, xs:all, occurrence constraints, named/anonymous types, extension & restriction, enumerations, patterns, numeric/length facets, built-in datatypes, groups, namespaces, xsi:nil. Identity constraints and multi-file includes are not supported.

Does the tool check XML tag matching and syntax errors?

Yes — the well-formedness check is a strict XML 1.0 parser that catches mismatched tags, unclosed elements, duplicate attributes, illegal characters, undefined entities, multiple roots and namespace prefix errors, each with an exact line and column.

Can I format or beautify XML with this tool?

Yes. Click “Pretty-print / Format” to re-indent your XML. Mixed content is kept inline so your data is never corrupted.

Is my XML data sent to a server?

No. Everything runs locally in your browser — your XML, XSD and DTD never leave your device. The page makes zero network requests.

Can I validate SOAP or XML-RPC messages?

Yes. Paste the SOAP envelope or XML-RPC payload as the XML document and validate it against the service's XSD — a common way to debug web-service integration errors.

What is an external DTD and is it supported?

An external DTD is referenced via SYSTEM or PUBLIC identifiers in the DOCTYPE. This tool does not fetch external DTDs (offline by design); paste the DTD content into the DTD box instead.

Why does my XML fail with “not declared in the schema”?

The root element (or a child) has no matching xs:element declaration — check for typos, wrong namespaces, or an elementFormDefault mismatch (qualified vs unqualified local elements).

Is this XML validator free?

Yes, completely free with no limits and no signup. It is a single self-contained page that works offline once loaded.

Free tool by NRTechStudio