JSON tool
JSON Validator — free online tool
Paste any JSON to check that it's valid — get the line, column and a plain-English reason for the first error, and one-click repair for the common mistakes.
What does this do?
Bad JSON is one of the most common bugs in development: a stray trailing comma, a single-quoted string, a missing quote around a key. This validator points at the exact line and column, shows the offending line with a caret, and explains the problem in plain words. "Repair" re-parses the text with a forgiving parser — not search-and-replace — so URLs containing `//` and apostrophes inside strings are left alone. It fixes trailing and missing commas, `//` and `/* */` comments, single quotes, unquoted keys, Python `True`/`False`/`None`, `NaN`, hex numbers, unclosed brackets, JSON Lines and JSONP wrappers. It also warns about duplicate keys and about numbers too large for JavaScript to hold exactly.
When to use it
- ▸Debug a JSON payload an API rejected
- ▸Validate `tsconfig.json`, `settings.json`, or other JSONC
- ▸Check a JSON Lines file before importing it
- ▸Auto-clean JavaScript-style object literals into valid JSON
Tip
A valid JSON document is exactly one value: object, array, string, number, boolean, or null. Strings must use double quotes. Keys must be quoted. Trailing commas, single quotes, and comments are not allowed — Repair fixes all of them. For files that are meant to have comments, such as tsconfig.json, switch on JSONC to format them with the comments kept.
Example: JavaScript-style object → valid JSON
Input — JSON
{
// A typical eslint config — not valid JSON, but Repair fixes it
rules: {
'no-unused-vars': 'warn',
'no-console': 'off',
},
extends: ['plugin:react/recommended'],
}Output
{
"rules": {
"no-unused-vars": "warn",
"no-console": "off"
},
"extends": [
"plugin:react/recommended"
]
}More JSON tools
JSON to YAML
Convert any JSON document to YAML 1.2 in your browser — proper quoting, nested objects and arrays, multi-line strings.
JSON to XML
Convert any JSON document to well-formed XML in your browser — proper entity escaping, nested elements, attributes via the `@` prefix.
JSON to CSV
Turn a JSON array of objects into a clean CSV file — perfect for Excel, Google Sheets, BigQuery, or any database import.
JSON Minifier
Shrink any JSON to the smallest valid form — strip every byte of whitespace, indentation, and line breaks while keeping the value identical.
Full JSON editor →
Pretty · Minify · Tree · YAML · XML · CSV · Schema · JSONPath · auto-repair
