XML and CSV validator online
Paste XML or CSV and choose the format. The tool reports every problem with line, column and an explanation – for CSV also the detected delimiter and a preview of the first rows. Nothing is uploaded.
How it is calculated
XML: what “well-formed” means
An XML document is well-formed when it follows the syntax rules of the W3C Recommendation XML 1.0 (Fifth Edition). The tool checks this with its own parser – with the same message in every browser – and stops at the first violation:
- exactly one root element; before and after it only comments, processing instructions and whitespace,
- every start tag has a matching end tag with correct nesting (
<a><b></a></b>is wrong); empty elements as<br/>, - names are case-sensitive:
<Name>…</name>does not match, - attribute values are always in
"…"or'…', each attribute only once per tag, no<inside the value, &and<in text only as&and<; the only known entities are< > & ' ", character references such as©and entities declared in the DTD – from HTML does not exist in XML,- comments without
--inside, CDATA sections only within elements, the XML declaration<?xml version="1.0"?>only at the very start, - no characters forbidden by XML 1.0 (control characters other than tab and line breaks).
No validation against a DTD or schema
The tool does not check whether the document matches a DTD, an XML Schema (XSD) or a standard such as UBL – i.e. whether required elements exist or values have the right format. Well-formedness is the precondition for that: every program rejects a document that is not well-formed. A DOCTYPE declaration is read only far enough to recognise the entities declared in it. Namespace prefixes without an xmlns:… declaration are reported as a warning.
CSV according to RFC 4180
RFC 4180 describes the common CSV format:
- one record per line, every line with the same number of fields; a header row is optional,
- fields containing the delimiter, a line break or
"are enclosed in double quotes:"Smith, John", - a
"inside a field is doubled:"He said ""Hello"""; without enclosing quotes a field must not contain", - spaces are part of the field – so
a, "b"is an error (the field starts with a space, not with").
RFC 4180 only knows the comma. Spreadsheets in many European locales save CSV with a semicolon because the comma is the decimal separator there; tab and | are common too. Automatic detection counts the fields of the first 50 records for each candidate and picks the character that most consistently yields at least two columns. If that is wrong, choose the delimiter manually.
The tool reports differing field counts, unclosed or misplaced quotes and blank lines in the middle of the file – with the actual line number (a field containing a line break spans several lines). RFC 4180 requires CRLF line endings; since practically every program also reads LF, the line ending is only shown in the overview.
Limits
At most 5 million characters; the first 50 errors are listed. Columns count characters starting at 1, a tab counts as one character.
Frequently asked questions
Is my data uploaded?
No. The check runs entirely in your browser. The text is not added to the address bar and not saved – the link only contains the format, delimiter and header option.
What is the difference between well-formed and valid?
Well-formed means the XML syntax is correct (tags, nesting, attributes, entities). Valid additionally means the document follows the rules of a DTD or XML Schema. This tool checks well-formedness only.
Why is &nbsp; an error?
is an HTML entity. Without a DTD, XML only knows five: < > & ' ". Write a non-breaking space as   or insert the character directly.
Excel shows my CSV file in a single column – why?
Usually the delimiter: Excel with a European locale expects semicolons while the file uses commas (or the other way round). The tool shows the detected delimiter. In Excel, “Data → From Text/CSV” lets you choose it.
Why does a row have too many fields?
Almost always the delimiter appears inside a value that is not quoted – e.g. Smith, John in a comma-separated file or 1,50 as a decimal. The correct form is "Smith, John".
Sources and legal basis
- §§ 2.1–2.8, 3.1, 4.1 (Well-Formedness Constraints): W3C – Extensible Markup Language (XML) 1.0 (Fifth Edition)
- W3C – Namespaces in XML 1.0 (Third Edition)
- § 2: IETF RFC 4180 – Common Format and MIME Type for Comma-Separated Values (CSV) Files
As of:
Related tools
- JSON formatter, validator and minifierValidate JSON against RFC 8259 with the exact line, column and a plain-English explanation. Beautify or minify, sort keys, copy. Runs locally in your browser.
- Regex TesterTest JavaScript regular expressions live: matches highlighted, capture groups in a table, every part of the pattern explained. Free, nothing uploaded.
- Base64 Encode and DecodeEncode and decode Base64 and Base64url with proper UTF-8, plus URL encode/decode (percent-encoding). Clear error messages, runs locally in your browser.
- Hash Generator: SHA-256, SHA-512, SHA-1, MD5Calculate SHA-256, SHA-384, SHA-512, SHA-1 and MD5 hashes of text or files and verify checksums – locally in your browser, no upload, free.
- Validate Email Address SyntaxCheck one or many email addresses for correct syntax under RFC 5321/5322: lengths, domain labels, international domains (Punycode). Local, nothing sent.
- Unix timestamp converterConvert a Unix timestamp to a date and back. Seconds, milliseconds, micro- and nanoseconds detected automatically; UTC, local time, ISO 8601 and more.