JSON Validator

Skip to editor
Explorer
Open Files

No files open

0 files open

jsoneditor.io v2

No file open

Create a new file or open an existing one from the sidebar

JSONUTF-8
Spaces: 2

How do I check if JSON is valid?

To check if JSON is valid, paste it above and press Validate. The status bar turns green when it's valid, or red with the parser's error message when it isn't, and the editor underlines the broken spot while you type.

This checks syntax, the same rules JSON.parse follows in JavaScript, so it catches missing commas, trailing commas, single quotes, unquoted keys, comments and anything else the JSON spec doesn't allow. It doesn't check your data against a JSON Schema.

  1. Paste your JSON into the editor.
  2. Press Validate in the toolbar.
  3. Fix whatever is underlined and validate again.

Example

Invalid JSON
{
  'name': "my-app",
  version: "1.4.0",
  "private": true,
}
Fixed
{
  "name": "my-app",
  "version": "1.4.0",
  "private": true
}

Questions people ask

What are the most common JSON errors?

Trailing commas after the last item, single quotes instead of double quotes, keys without quotes, comments and missing commas between items. JSON is stricter than JavaScript object syntax, which is why code copied out of a .js file often fails.

Does JSON allow comments?

No, standard JSON has no comments. Formats like JSON5 and JSONC allow them, but a strict parser like this one flags them as errors, and so will most APIs.

Can it validate YAML too?

Yes, if the active tab is YAML, Validate parses it as YAML and tells you whether it's valid.

Does it validate against a JSON Schema?

Not yet, it checks that the JSON is well formed. Schema validation is on the list.

Is my data uploaded anywhere?

No, this runs entirely in your browser, so nothing you paste is sent to a server. The only feature that sends data anywhere is the optional AI assistant, and only when you actually ask it something.

Read the guideCommon JSON Syntax Errors and How to Fix Them