ToolGuest
Global · Tier-1 optimized
✓Strict RFC 8259 · plain-English fixes · nothing uploaded

JSON Validator & Syntax Checker

Check any JSON document against RFC 8259 and land on the broken character. Every error comes with a line, a column and a fix hint you can act on immediately.

Exact line & column Fix hints No uploads Works offline
0 B input 0 B output 0% vs input 0 values 0 levels deep
Input JSON

Drop a .json file anywhere in this pane — it is read with FileReader in this tab.

0 lines · 0 characters · 0 B
Formatted output
0 lines · 0 characters · 0 B

Parsed with the native JSON.parse in your browser. Zero network requests, no upload endpoint.

AI summary

What does ToolGuest JSON Validator check? ToolGuest JSON Validator parses a document against RFC 8259 in the browser and reports the exact line, column and character offset of the first error, with a plain-English hint for trailing commas, single quotes, unquoted keys and comments. Validation is instant, works offline, and the payload never leaves your device.

Complete your JSON debugging workflow Diff Checker Base64 Encoder Epoch Converter
How it works

Validate a JSON document in three steps

  1. 1

    Paste the document

    Drop in a response body, a config file or a request payload. The sample on this page is deliberately invalid so you can see the error report.

  2. 2

    Read the verdict

    A valid document gets a green badge. An invalid one gets the parser's message, the line and column, and a hint naming the likely cause.

  3. 3

    Jump, fix, re-check

    Go to error selects the offending character in the editor. Fix it and the verdict updates as you type.

Strictness

What strict validation catches that a quick eyeball does not

A validator is not a linter with opinions; it is the same grammar every JSON parser implements. That means it rejects a trailing comma, a single-quoted string, an unquoted key, a raw tab inside a string, a leading plus sign on a number and a comment, even when each of those is legal in the JavaScript you copied from.

Those differences matter because the consumer is rarely your editor. A payment API, a message queue or a data warehouse will reject the document, and the failure usually surfaces in production rather than at authoring time. Checking here costs a keystroke and tells you before the deploy does.

Reading errors

How to read a JSON error: line, column and character offset

Browsers report a character position, not a line. Position 412 means the 412th character from the start of the document, counting newlines, which is precise but useless to a human scanning a file. This tool converts it into a one-based line and column, and keeps the offset for the jump button.

If two errors exist, fix the first one and re-validate. Parsers stop at the first failure, so a missing brace early in the document can make a later comma look like the problem. The hint names the pattern it recognises, not just the character it tripped over.

Verdict reference

What each validation message means

The message comes from the browser's own parser, so it can be terse. The middle column translates it; the right column is the fix that usually works.

Message you seeWhat it meansFix
Unexpected token } in JSONThe parser reached a closing brace where it expected a key or a value.Remove the trailing comma before it, or add the missing member.
Unexpected token 'A single quote opened a string.Replace both quotes with double quotes.
Expected property name or '}'A key is unquoted, or a comma is missing between members.Quote the key and add the comma.
Bad control character in string literalA raw newline or tab sits inside a string.Escape it as \n or \t.
Unexpected end of JSON inputThe document stops before the structure closes.Add the missing } or ] and check bracket pairs.
Unexpected token /A comment was left in the document.Strip // and /* */ comments.
FAQ

JSON validation questions

What makes JSON valid under RFC 8259?

A valid document is a single value: an object, array, string, number, true, false or null. Strings and keys use double quotes, numbers follow a strict decimal form, and no comments or trailing commas are allowed. Whitespace between tokens is fine, but nothing else is.

Why does my JSON validate in JavaScript but fail here?

JavaScript object literals are more permissive than JSON. They allow single quotes, unquoted keys, trailing commas and comments, and a script can evaluate them without complaint. A JSON parser implements the stricter grammar, so the same text fails here even though your code runs.

Can I validate a large API response in the browser?

Yes. Validation is a single JSON.parse call, so the cost is linear in document size. A few megabytes are effectively instant, and tens of megabytes usually work on a modern laptop. If the tab runs short of memory, validate a slice of the response first.

Does validation change or reformat my document?

No. Validating only reports whether the text parses. The formatted output you see is a separate serialisation produced after a successful parse, and the original text stays untouched in the input pane until you edit, clear or replace it. Nothing is written back to the source document.

Is it safe to paste production payloads into this validator?

Yes, because nothing is transmitted. The parser runs in your tab and there is no upload endpoint, so tokens, emails and internal identifiers never reach a server. That is the difference between this validator and tools that post your document to an API.

The cluster

All JSON Formatter, Validator & Viewer Tools

Seven pages, one client-side engine. Every tool formats, validates and minifies in the same workspace, and each page opens with the mode its name promises — a validator that lands on errors, a minifier that shows the bytes saved, a viewer that starts in the tree.

Last updated ·Reviewed by the ToolGuest editorial team