Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsXML Formatter & ValidatorXML Validator

XML Validator

dev

Check XML is well formed and see exactly where it breaks

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

Something is rejecting your file and the only clue is "invalid XML". Paste it here to see the first real problem with its line and column: a tag closed by the wrong name, an attribute value missing its quote, a bare ampersand, a comment that never ends, or two root elements. Each one comes with what to change, not a parser dump.

Next:
  • JSON Formatter & Validator Format, validate, minify and sort JSON with exact error positions
  • HTML Formatter & Minifier Indent messy HTML, or minify it and see the bytes you saved

How to check if XML is valid

1

The page opens in Validate mode; paste the document into the XML box.

2

Read the result: Well formed, or Not well formed with the line and column of the first problem.

3

Follow the hint under the box, fix the input and watch the result change.

4

Once it is well formed, read the root element, element and attribute counts and the deepest nesting.

How XML Validator works

This XML formatter does three jobs from one box. Format indents the document as a tree, one element per line, at two spaces, four spaces or a tab. Validate checks that the document is well formed and, when it is not, gives you the first real problem with its line and column. Minify strips the indentation and, if you want, the comments, and shows the bytes saved.

XML tends to arrive in an awkward state. A SOAP response or an API payload is one line thousands of characters long. A feed from a partner is rejected by your importer with nothing more than "invalid XML". A config file has been edited by three people and no longer lines up. All three are a paste away from readable here.

The validator checks what XML actually requires: one root element, every tag closed by its own name in the right order, attribute values in quotes and never set twice, ampersands written as entities, and nothing but whitespace and comments outside the root. Messages say what to change, such as which element was opened earlier and has to be closed first. It does not check against a DTD or an XSD schema; it checks that the document is well formed, which is the failure people actually hit.

The rest of the article, and all 6 questions about XML Formatter & Validator, are on the XML Formatter & Validator page.

Frequently asked questions

How do I find out where my XML is invalid?

Paste it and the first problem is shown with its line and column, next to the input. Typical answers are a tag closed by the wrong name, an attribute value missing its quote, a bare ampersand that should be &, or a second root element.

Does it validate against a DTD or an XSD schema?

No. It checks that the document is well formed: one root, correctly nested and closed tags, quoted attributes and valid entities. Schema validation needs the schema itself and is a different job. Well-formedness is what most rejected files actually fail.

Will minifying XML change my data?

No. Only whitespace between elements is removed, because that is indentation a formatter added. Text inside an element is the data, so it is copied exactly, and CDATA sections are left untouched. Comments are removed unless you keep them.

Can it format a SOAP response or an RSS feed?

Yes. Both are ordinary XML. Paste the whole response, including the XML declaration, and it comes back as an indented tree. Namespace prefixes such as soap: and content: are element names like any other and are preserved.

Still stuck? Ask about XML Formatter & Validator and anybody who knows can answer. No account needed.

More ways to use XML Formatter & Validator

  • XML Formatter & ValidatorIndent XML, minify it, and see the first error by line and column
  • XML MinifierStrip the indentation from XML without touching the data

Same job, other tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL · JSON Validator – Check JSON and see exactly where it breaks.

On the related tools: Markdown to HTML – Convert Markdown into clean, safe HTML you can paste anywhere.

Related tools

All developer tools
Hex Viewer (xxd online)See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a fileGraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and columnJSONL Viewer and ValidatorCheck JSON Lines and NDJSON line by line, view records as a table, convert to a JSON arrayJSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positionsSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shown

In the collection Code Formatters and Minifiers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)