JSON Validator & Linter

Paste JSON to validate it instantly. See error details, metrics, and type breakdown.

Input

Free online JSON validator and linter

Invalid JSON is one of the most common sources of API errors and configuration bugs. A missing comma, a trailing comma after the last key, or single quotes instead of double quotes will cause the parser to throw and give you a cryptic error. This validator shows you exactly where the problem is: file offset, line, and column: so you can fix it in seconds.

Beyond validation, the tool pretty-prints valid JSON, shows file size, and breaks down the structure by type. Knowing how many strings, numbers, nulls, and nested objects are in your document is useful when auditing data models or debugging unexpected API responses. All processing is client-side: nothing is uploaded.

Step-by-step guide

  1. 1
    Paste your JSON
    Copy the JSON string you want to validate and paste it into the input textarea.
  2. 2
    Check the validity badge
    A green Valid JSON badge or red Invalid JSON badge appears immediately based on the parse result.
  3. 3
    Read the error details
    If invalid, the red error panel shows the exact parse error message and line/column location so you can find the issue quickly.
  4. 4
    View the formatted output
    If valid, the Formatted Output panel shows the JSON pretty-printed with 2-space indentation and a size indicator.
  5. 5
    Review the metrics
    Below the output, check the type breakdown: strings, numbers, booleans, nulls, arrays, objects: and structural stats like max depth and total keys.

Related Tools

Frequently Asked Questions

What does a JSON validator do?
A JSON validator parses the input string using the JSON spec and reports whether it is syntactically valid. If invalid, it reports the exact error and position. If valid, it can pretty-print the data and provide statistics.
What are common reasons JSON is invalid?
The most common issues are: trailing commas after the last item in an object or array, using single quotes instead of double quotes for strings, missing quotes around property names, unescaped special characters in strings, and comments (which are not allowed in JSON).
Is my JSON sent to a server?
No. Validation is performed entirely in the browser using JavaScript's JSON.parse() function. Your data never leaves your device.
What is the max depth metric?
Max depth shows the deepest level of nesting in your JSON structure. A depth of 1 means a flat object; a depth of 5 means objects nested five levels deep. Very deep structures can be hard to maintain.
Can this tool pretty-print minified JSON?
Yes. Paste any valid JSON: including minified, single-line JSON: and the Formatted Output panel will display it with 2-space indentation and proper line breaks.
Does the tool support JSON5 or JSONC (comments)?
No. This tool validates strict JSON as defined by RFC 8259. JSON5 extensions like comments, trailing commas, and unquoted keys are not valid JSON and will be reported as errors.
What do the type breakdown counts mean?
The breakdown counts every value in the document by type: strings, numbers, booleans, null, arrays, and objects. This gives you a quick structural overview of the data without reading every line.
What is the difference between JSON linting and JSON schema validation?
Linting checks syntax: is the JSON well-formed? Schema validation checks structure: do the values match an expected shape (required fields, types, ranges)? This tool performs syntax linting only.

AlteredIdea vs alternatives

vs server-side tools: Everything runs in your browser: your data never leaves your device.

vs VS Code extensions: No install needed. Works instantly in any browser.

vs paid tools: Completely free, no account required.