Skip to content
toolgrid

No tool found. Try another word.

Data Format Validator

Validate JSON, XML, YAML, TOML or CSV and see the exact line and column of the first error. The format is detected automatically.

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the Data Format Validator

  1. 1 Paste the data or open a file.
  2. 2 Leave the format on automatic or choose it.
  3. 3 Read whether it is valid; for errors, see the line and the position marked.

About the Data Format Validator

Configuration files and data exchange formats break on the smallest mistake: a missing comma in JSON, an unclosed tag in XML, wrong indentation in YAML. This validator checks the syntax and points to the exact line and column of the first error, with the line shown and the position marked.

The format is detected from the content: braces and brackets for JSON, angle brackets for XML, key = value lines and [sections] for TOML, delimited lines for CSV and YAML otherwise. Choose the format yourself if the guess is wrong.

YAML is checked with js-yaml (YAML 1.2, several documents separated by --- are allowed), TOML with a TOML 1.0 parser, XML for well-formedness and CSV against RFC 4180. Valid input shows a short summary, such as the root element or the number of rows.

Frequently asked questions

Does it check against a schema?

No, it checks the syntax: whether the text is valid JSON, XML, YAML, TOML or CSV. A schema validator also checks which fields must be there.

Why is my YAML invalid?

Mostly because of tabs used for indentation, inconsistent indentation or a colon without a space after it.

Is YAML a superset of JSON?

Practically yes: valid JSON is also valid YAML 1.2, so JSON pasted with the YAML format chosen is accepted.

Which line numbers are shown for CSV?

The record number, with the header row as row 1, and the column where it applies.