JSON Validator

Paste or upload JSON to instantly validate it, find syntax errors with line and column information, and format or minify the result. Everything runs in your browser — your data never leaves your device.

Read the guide: How to validate JSON
3 of 3 free uses remaining today
3 validations remaining

Input

0 chars · 0 lines
Drop a .json file to load and validate itUp to 5.0 MB per file
Indentation:

Result

Validation results will appear here.

Your JSON is processed only to provide the requested validation and formatting functionality. We do not include your JSON content in analytics.

How the JSON Validator works

  • Your text is parsed using the browser's built-in JSON parser in a background worker.
  • If parsing succeeds, the tool reports the root type and lightweight statistics.
  • If parsing fails, the error position is converted to a line and column so you can find the problem fast.
  • Format and Minify re-serialise the parsed value with your chosen indentation or no whitespace.

See also: JSON Formatter and JSON to CSV Converter.

Examples

Simple object

{
  "name": "John",
  "age": 30,
  "active": true
}

Array of objects

[
  {"id": 1, "name": "Ada"},
  {"id": 2, "name": "Alan"}
]

Useful tips

  • Use Validate first on broken JSON to find the error before formatting.
  • Choose 2 spaces, 4 spaces or tabs for formatting — the data stays the same.
  • Upload a .json file to validate it instantly without pasting.

Frequently asked questions

What is a JSON Validator?+

A JSON Validator checks whether your text conforms to JSON syntax rules and can be successfully parsed. It reports any syntax errors with the line and column where the problem was found.

How do I validate JSON?+

Paste your JSON into the editor and click Validate JSON. The tool parses it instantly and reports whether it is valid, or shows the error location if it is not.

Why is my JSON invalid?+

The most common causes are unquoted property names, single quotes instead of double quotes, trailing commas, missing commas between values, and unclosed brackets or braces.

Does JSON allow single quotes?+

No. JSON requires double quotes for all strings and property names. Single quotes are valid in JavaScript but not in JSON.

Does JSON allow trailing commas?+

No. Standard JSON does not allow a comma after the last value in an object or array. Remove any trailing commas.

How do I format JSON?+

Paste valid JSON and click Format JSON. The tool pretty-prints it with consistent indentation. You can choose 2 spaces, 4 spaces, or tabs.

How do I minify JSON?+

Paste valid JSON and click Minify JSON. The tool removes all unnecessary whitespace while preserving the data exactly, producing the smallest valid JSON.

What is the difference between JSON and JavaScript?+

JSON is a data format based on JavaScript syntax but stricter. JSON requires double-quoted keys, does not allow trailing commas, comments, or single-quoted strings, and does not support expressions or functions.

Can I validate a JSON file?+

Yes. Click Upload JSON File and choose a .json file. The file is loaded as text and validated immediately.

Is my JSON stored when I validate it?+

No. Your JSON is processed entirely in your browser and is never uploaded or stored. We do not include your JSON content in analytics.

Related guides

What would you like to do next?