JSON Forge
100% Client-Side: your data is never sent to a server

JSON Validator

Check whether your JSON is valid as you type. Errors are reported with the exact line and column, and the Fix JSON button can repair the most common mistakes automatically.

Loading editor…
Paste or type JSON on the left to explore it as a tree.
Empty🔒 Processed locally in your browser

How to validate JSON

  1. Paste or type your JSON in the editor. Validation runs automatically while you type.
  2. Read the status bar: a green badge means valid, a red message shows the error and its position.
  3. Press Go to error to jump to the problem, or Fix JSON to attempt an automatic repair.

Reading a JSON error message

Parsers report the position where they gave up, which is often one token after the real mistake. If the error points at a closing brace, check the line above for a missing comma or an unclosed string. Unexpected end of input almost always means a bracket was never closed.

Strict JSON versus JavaScript objects

Object literals copied from JavaScript code frequently fail validation: they use single quotes, unquoted keys, trailing commas or comments, and may contain undefined or NaN. JSON allows none of these, which is why Fix JSON can rewrite them into valid syntax.

What is JSON?

JSON (JavaScript Object Notation) is a lightweight, text-based data format that is easy for people to read and for machines to parse. It is the de facto standard for web APIs, configuration files and data exchange between services. A JSON document is built from just six value types: objects, arrays, strings, numbers, booleans and null.

{
  "name": "Ada",
  "age": 36,
  "admin": true,
  "skills": ["math", "code"],
  "address": { "city": "London" },
  "manager": null
}

JSON is stricter than JavaScript object literals: keys and strings must use double quotes, trailing commas are not allowed and comments are not part of the specification (RFC 8259).

Why format JSON?

APIs usually return minified JSON on a single line, which is efficient for machines but unreadable for people. Formatting (also called pretty printing or beautifying) adds consistent indentation and line breaks so that you can scan the structure, spot mistakes and review changes. Minifying does the opposite and strips whitespace to reduce size.

Frequently asked questions

What are the most common JSON syntax errors?

Trailing commas after the last item, single quotes instead of double quotes, unquoted property names, comments, and missing closing brackets or braces. Standard JSON allows none of them.

Does the validator support JSON Schema?

Yes. Open the Schema tab, paste a JSON Schema (or generate one from your data) and the editor content is validated against it, with the path and reason for every problem. See the JSON Schema Validator page for details.

Is my JSON uploaded to a server?

No. Parsing, validation, formatting, diffing and code generation all run inside your browser, using a Web Worker. Your data is never sent to any server, which makes the tool safe for API responses, configuration files and other sensitive payloads.

How large a JSON file can I open?

Files of 20 MB and more work. Parsing happens off the main thread and the tree view is virtualized, so only the rows you can see are rendered. The editor switches to a lighter mode for very large documents.

What is the difference between formatting and minifying JSON?

Formatting (pretty printing) adds line breaks and indentation so people can read the data. Minifying removes all optional whitespace to make the payload as small as possible for network transfer or storage. Both produce identical data.

More JSON tools