Free JSON Validator Online

Validate JSON online for free. Pinpoints the exact line and column of syntax errors, highlights the broken line and reports keys, depth and size of valid JSON.

  • No upload, 100% private
  • Instant, in your browser
  • 100% free, no signup
Loading tool…
Read the complete guideHow to Validate JSON and Read Parser Error Messages Correctly →

About the JSON Validator tool

A single missing comma or stray quote makes a whole JSON file unreadable to an API, a config loader or a build tool, and the error they print is often vague. This JSON validator tells you whether your JSON is valid and, when it is not, exactly where the problem is.

As you type or paste, the input is checked with the browser’s strict JSON parser. Errors are reported with a line and column number, the surrounding lines are displayed with the faulty line highlighted and a caret under the column, and a “Go to error” button jumps the cursor straight to that spot in the editor. Where a browser does not report a position, a built-in scanner works it out, so you always get a location.

When the JSON is valid, the tool summarises its structure: total keys, maximum nesting depth, number of objects and arrays, and a count of strings, numbers, booleans and nulls, alongside the file size. You can then format it with two-space indentation or minify it in one click. All validation happens locally, so API keys or customer data in your JSON stay on your machine.

How to use JSON Validator

  1. Paste your JSON into “JSON to validate” or click “Open file”.
  2. Read the status bar: a green “Valid JSON” message or a red error with line and column.
  3. For errors, look at the highlighted snippet or click “Go to error” to jump to the problem.
  4. Once valid, review the stats tiles and use “Format” or “Minify” to rewrite the document.

Features

Exact error position

Line and column for every syntax error, with the broken line highlighted in context.

Jump to error

One click places the cursor on the offending character in the editor.

Structure statistics

Keys, depth, objects, arrays and value types are counted for valid documents.

Format and minify

Rewrite valid JSON as indented or compact output without switching tools.

Strict RFC 8259 parsing

Comments, trailing commas and single quotes are flagged, just as real JSON parsers do.

When to use it

  • Find the typo that makes an API return “Unexpected token” errors.
  • Check a package.json, composer.json or tsconfig before committing it.
  • Validate a JSON export from a database or spreadsheet tool.
  • Measure how deeply nested a response is before designing a data model.
  • Confirm that hand-edited translation files are still valid JSON.

Frequently asked questions

What makes JSON invalid?

The most common problems are trailing commas, single-quoted strings, unquoted keys, comments, missing commas between items and unescaped line breaks inside strings. JSON is stricter than JavaScript object syntax.

Does this validator check against a JSON Schema?

No. It checks syntax and reports structure. To create a schema from a sample document, use the JSON Schema Generator on this site.

Why is the column number slightly off in my editor?

Columns count characters, and a tab counts as one character here. Editors that expand tabs to several spaces may show a different visual column.

Are duplicate keys reported?

Duplicate keys are syntactically allowed by the JSON grammar, so they do not make the document invalid; the last value wins when parsed.

Is there a size limit?

Files up to 20 MB can be opened. Very large documents may take a moment to parse, depending on your device.

Related tools