Tools › Data
Data Validator
Check JSON, YAML, TOML or CSV as you type. The text is syntax-highlighted, and each problem is listed with its line and column and marked where it is.
About this tool What it's for, how to use it and an example
What it's for
Check that a JSON, YAML, TOML or CSV file is valid before you use it, and find exactly where it isn’t. The text is coloured as you type, every problem is listed with its line and column, and each one is underlined in the text.
For example, when a deployment fails because of a config file, paste it here to find the stray comma, the duplicated key or the badly indented line.
How to use it
Paste or type the text, or choose a file (you can also drop one on the page). It’s checked as you type.
- Format is detected from the text, or you can choose it. Choosing a file picks the format from its extension. Your choice is remembered in this browser.
- Each problem is listed under the text. Errors make the text invalid; warnings, such as a duplicate JSON key, are allowed but probably a mistake. Select Line …, column … to jump to it.
- In the text, a problem is underlined from where it is to the end of its line, red for errors and amber for warnings.
Example
Paste this:
name: web
ports:
- 80
- 443
name: api
The tool detects YAML and reports Line 5, column 1 Error: Duplicated mapping key, because name appears twice.
Change the second one to label: api and the text is valid.
Good to know
- JSON is checked as strict JSON: comments, trailing commas and single quotes are errors. Duplicate keys are warnings, because most readers silently keep the last one.
- JSON, YAML and TOML checks stop at the first error, since what follows it can’t be read reliably. CSV lists every problem.
- CSV is checked against RFC 4180: every row should have as many fields as the first, and quotes must be used properly. The delimiter (comma, tab, semicolon or pipe) is detected from the first line.
- Detection guesses from the text’s shape; choose the format if it guesses wrong. YAML is read as YAML 1.2, and TOML as TOML 1.0, using smol-toml.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.