{ } JSON & DATA · VALIDATOR

JSON Validator

Check JSON instantly and see exactly what's wrong — the line, the column and how to fix it. Detect hidden problems other validators miss, and repair common mistakes like trailing commas, comments and single quotes in one click.

Exact error location · Duplicate key detection · One-click repair · Files up to 50 MB
Tip: drop a .json file onto the input to validate it.Want to pretty-print it? JSON Formatter →
JSON inputChecked as you type
ResultRFC 8259
Size: 0 B
Lines: 0
Time: –
Strict RFC 8259 parser · 100% Client-Side
◆ ABOUT THIS TOOL

What Does a JSON Validator Check?

Whether your text is valid JSON — and, if not, exactly where and why it breaks.

JSON (RFC 8259) is strict: keys need double quotes, strings can't contain raw line breaks, and trailing commas, comments, single quotes, NaN and undefined are all forbidden. One stray character makes the whole document unreadable to JSON.parse, APIs and config loaders.

This validator uses its own strict parser instead of the browser's, so instead of a cryptic “Unexpected token at position 4817” you get the line, column, the offending line with a pointer and a plain-English fix. If a bracket is never closed, it tells you where that bracket was opened.

It also flags problems that are technically valid but dangerous: duplicate keys (most parsers silently keep only the last value) and numbers too large for JavaScript, like 64-bit IDs that would be silently rounded.

Got JSON from a JavaScript object, a Python dict or a hand-edited config? Repair fixes trailing commas, comments, single or curly quotes, unquoted keys, True/False/None, NaN, missing commas and more — and you can undo it.

⚠ COMMON ERRORS

The Most Common JSON Errors (and Fixes)

What the messages mean and how to fix them.

ErrorInvalidValid
Trailing comma{"a": 1,}{"a": 1}
Single quotes{'a': 'x'}{"a": "x"}
Unquoted key{a: 1}{"a": 1}
Comment{"a": 1 // note}{"a": 1}
Python literals{"ok": True, "v": None}{"ok": true, "v": null}
Missing comma{"a": 1 "b": 2}{"a": 1, "b": 2}
Bad backslash{"path": "C:\Users"}{"path": "C:\\Users"}
Line break in string"line 1⏎line 2""line 1\nline 2"
Leading zero{"zip": 01234}{"zip": "01234"}
NaN / undefined{"x": NaN}{"x": null}
◐ THREE STEPS

How to Use the JSON Validator

Get your result in under ten seconds.

1

Paste or drop JSON

Paste JSON into the input or drop a .json file (up to 50 MB). It is validated as you type.

2

Read the diagnosis

Valid JSON shows a green check with statistics. Invalid JSON shows the line, column, the broken line with a pointer and how to fix it — click Go to error to jump there.

3

Repair or format

Click Repair to fix common mistakes automatically (undo is one click away), or Format to pretty-print valid JSON.

✓ FEATURES

Why Use the JSON Validator on Developers Web Tools

Fast, accurate and private — built for developers.

📍

Exact error location

Line, column and a visual pointer — plus where an unclosed bracket was opened.

💬

Plain-English fixes

Every error comes with a concrete suggestion, not a parser stack trace.

🔧

One-click repair

Fixes trailing commas, comments, quotes, unquoted keys, Python literals and missing commas.

🔍

Hidden problems

Detects duplicate keys and numbers that would lose precision in JavaScript.

⚡

Big files, no freeze

Documents over 512 KB are validated in a background worker; files up to 50 MB.

🔒

Private

Your JSON never leaves your browser — safe for API keys, tokens and customer data.

FAQ

Frequently Asked Questions

JavaScript object literals are more relaxed than JSON. JSON requires double-quoted keys and strings and forbids trailing commas, comments, single quotes, undefined, NaN and functions. Click Repair to convert a JS object literal to valid JSON.

The specification says keys “should” be unique, so duplicates are technically allowed — but behaviour is undefined. JavaScript, Python and most libraries silently keep only the last value, which hides bugs. This validator lists every duplicate with its path and line.

JavaScript stores numbers as 64-bit floats, so integers above 9,007,199,254,740,991 (253−1) are rounded: 12345678901234567890 becomes 12345678901234567000. 64-bit database IDs and Twitter/Snowflake IDs are common victims. Send them as strings to be safe.

It strips comments, removes trailing commas, converts single and curly quotes to double quotes, quotes bare keys, converts True/False/None to true/false/null, turns NaN/Infinity/undefined into null, normalises numbers like .5 or 0x1F and adds missing commas. It tells you exactly what it fixed, and Undo restores your original text.

This tool validates syntax. To check structure — required fields, types, formats — use the JSON Schema Validator (coming soon).

A byte order mark (U+FEFF) is invisible but breaks JSON.parse in browsers and Node.js. The validator accepts it and warns you so you can save the file as UTF-8 without BOM.

No. Validation runs entirely in your browser with JavaScript. Nothing is sent to a server or stored.