XML validator

Find XML syntax errors and inspect a supplier feed’s parsed structure. Your file stays in your browser.

Your XML

Paste up to 1,000,000 characters. Checks update as you edit.

UTF-8 or UTF-16, up to 1,000,000 bytes. Replaces the text above.

Optional XSD schema

XSD 1.0, up to 1,000,000 bytes.

Choose local files named by imports or includes.

Syntax result

Well-formed XML

Elements parsed

4

Checks syntax and namespaces. Add an XSD for a separate conformance check.

Example: well-formed XML with 4 elements.

Parsed structure

Schema result

No schema selected

What XML validation checks

Plain-text outline. Comments omitted. Indentation capped at 16 levels.

DTD and custom entities are refused. Up to 128 nesting levels and 100,000 elements.

Well-formed XML has one root element, matching start and end tags and properly nested elements. Attribute names must be unique on each element. Custom namespace prefixes must be declared.

This XML validator reports the first parsing error. Its line and column point to where the parser detects the problem. The mistake can begin earlier, such as an opening tag with the wrong name.

The W3C XML specification distinguishes well-formed syntax from validation against a document’s declared rules. The syntax check covers namespace bindings. An optional XML Schema Definition (XSD) checks the rules in your supplied schema. DTD validation and channel-specific product requirements remain outside this check.

A feed can pass this check while missing a product identifier or containing an unsupported availability value. Use the guide to Google product feed requirements for the channel’s data rules.

Fix a broken product feed

This hypothetical excerpt has an unescaped ampersand and a mismatched closing tag.

Write the ampersand as &amp; so it remains part of the title text. Replace </item> with </product> to match the opening tag.

Paste the corrected excerpt into the checker. It returns well-formed XML with 2 elements. Fix the first reported error and check again, because it can hide later errors.

Read errors without uploading the feed

Files are read on your device and checked in your browser. The tool does not send your XML to a server or save it between visits. The parsed outline displays text without running XML as HTML or SVG.

An empty file has no XML document to check. A file containing <feed/> is well-formed XML with one root element, even though it has no product rows.

For a file with a DTD or custom entities, ask your supplier for an export without those declarations. Predefined entities such as &amp; and numeric character references are supported. After correcting errors, update the supplier’s export so the next feed contains the same fix.

Check XML against an XSD schema

This XML schema validator checks a well-formed document against a local XSD 1.0 schema. Choose the main schema, then any files it imports or includes.

The W3C XML Schema primer explains how schemas combine documents. The checker matches relative schema locations to the supplied filenames. Filenames must be unique.

Missing dependencies stop the schema check. Remote URLs and absolute paths are refused, and the tool never downloads schemas. An import without a local schemaLocation also stops the check.

Save this hypothetical schema as price.xsd, then choose it as the main schema.

For this schema, <price>79.00</price> passes syntax and conforms to XSD. Changing the value to free keeps valid syntax but fails the decimal rule.

A mismatched closing tag, such as <price>79.00</cost>, fails syntax first. The tool keeps that line-level error separate and waits for a correction before checking XSD.

All schema files stay on your device. The check supports up to 20 files, each within the XML file limit, with 5,000,000 characters in total. XSD 1.1 and xml:base are unsupported. Checks stop after 10 seconds.

A schema pass confirms the supplied rules. Check the channel’s product-data requirements separately when the schema does not define them.