JSON Validator: Check, Lint & Auto-Fix JSON Online
Paste JSON and know instantly whether it is valid. When it isn't, we point at the exact line and column, draw a caret under the broken character, explain why the parser choked, and offer a one-click lenient fix: all in your browser, nothing uploaded.
What is the json validator?
The JSON Validator checks JSON against RFC 8259, pointing at the exact error line and column with a caret under the broken character and a plain-English explanation. One-click auto-fix handles trailing commas and single quotes, plus depth, key-count and type stats. Free and client-side, with nothing uploaded.
The GigAI JSON Validator is a strict, RFC 8259 conformance checker and linter that runs entirely in your browser. Paste, drop or type JSON and it tells you the moment something is wrong. Not with a vague 'unexpected token', but with the precise line and column, a caret drawn directly under the offending character, and a plain-English explanation of what the parser expected there. It recognises the mistakes that trip everyone up: a trailing comma after the last array element, single quotes instead of double, unquoted object keys, // or /* */ comments carried over from JavaScript or JSONC, and non-standard literals like NaN, Infinity or undefined. Turn on lenient Auto-fix and it repairs those issues in one click and shows you a line-by-line report of exactly what it changed, so you stay in control and learn the rules instead of guessing. For valid documents it goes further than a pass/fail: it profiles the structure, total keys, maximum nesting depth, object and array counts, byte size, and a breakdown of how many strings, numbers, booleans and nulls it contains, so you can sanity-check a payload's shape at a glance. Because it uses the browser's native JSON engine on your own device, your API responses, tokens, config and customer data are never uploaded, stored or logged. It's the linter you reach for when JSON.parse fails in production and you need the answer in seconds.
- Difficulty:
- Easy
- Typical time:
- ~15s
- Processing:
- 100% browser processing
Last updated
How to use the json validator
- 1
Paste, drop or import JSON
Paste into the editor, drag a .json file onto it, or load the built-in sample. Validation begins immediately.
- 2
Read the verdict
A green badge means valid, RFC 8259-conformant JSON. A red one shows the exact line, column, a caret under the bad character and what went wrong.
- 3
Auto-fix or fix by hand
Click Auto-fix to repair common issues and review the change report, or click Jump to error to place your cursor on the character and fix it yourself.
- 4
Inspect the stats
For valid JSON, check the depth, key-count and value-type breakdown to confirm the document's shape, then copy or share.
What JSON Validator includes
Caret at the exact error
Beyond the line and column, we reproduce the failing line and draw a caret directly under the character the parser rejected, so you see the problem, not just coordinates.
Plain-English diagnoses
We detect and name the real cause (trailing comma, single quote, unquoted key, stray comment, NaN/Infinity) and tell you the RFC rule it breaks, instead of a cryptic 'unexpected token'.
One-click lenient auto-fix
Opt into Auto-fix to repair trailing commas, single quotes, comments and unquoted keys in a click, with a line-by-line report of every change so you stay fully in control.
Structure & type stats
Valid JSON is profiled: total keys, maximum nesting depth, object/array counts, byte size and a breakdown of strings, numbers, booleans and nulls, a quick shape check for any payload.
Validates as you type
Every keystroke re-validates with a smart debounce, so the verdict, error caret and stats stay live without hunting for a 'Validate' button.
100% in your browser
Validation uses the browser's native JSON engine on your device. No API response, secret or config file is ever uploaded, stored or logged.
Why use our json validator
Find the broken character in seconds
The caret and named diagnosis turn a failed JSON.parse into an instant fix, instead of squinting at a wall of braces trying to spot a stray comma.
Learn the rules, not just patch symptoms
Because Auto-fix reports every change it makes, you see which JavaScript habits JSON rejects, and stop repeating them.
Sanity-check payload shape
Depth, key-count and type stats let you confirm a response or fixture looks structurally right before it flows into a pipeline or UI.
Safe for sensitive data
It runs locally, so you can validate JSON containing tokens, PII or internal API shapes without any of it leaving your machine.
Built for the way you work
From quick one-off fixes to daily workflows, see how people put this tool to use.
- Backend developer
Debug a 400 from a request body
When an endpoint rejects a payload as malformed JSON, paste the body to get the exact character at fault and confirm it's valid before retrying.
- DevOps / Platform engineer
Lint config before it ships
Validate a package.json, tsconfig or CI config that failed to load, jump straight to the trailing comma or comment, and auto-fix JSONC leftovers.
- QA / Data engineer
Gate fixtures and exports
Confirm a data dump is valid JSON and eyeball its depth and type mix before it enters a test suite or ingestion pipeline.
- API integrator
Verify a webhook payload
Paste a captured webhook body to prove it parses and inspect its structure so you can map fields with confidence.
Supported formats
Accepts JSON, JSONC and TXT, and produces JSON, all processed locally in your browser.
- JSON
- JSONC
- TXT
- JSON
Frequently asked questions
Recommended tools
JSON Formatter
Format, validate and minify JSON in your browser with pinpoint error line + column, jump-to-error, key sorting and live editing: nothing is uploaded.
JSON to TypeScript
Convert JSON to TypeScript interfaces or types instantly, with merged unions across array items, optional-from-null, readonly, export and naming controls, 100% in your browser.
JWT Decoder
Decode and inspect any JSON Web Token instantly. Read the header, payload and signature, see when it was issued and expires, and optionally verify an HS256 signature. 100% in-browser. Your token never leaves your device.
JSON Diff
Compare two JSON documents by structure, not text. Reordered keys and whitespace are ignored. You see added, removed and changed values by path with counts, all in your browser.
JSON Tree Viewer
Explore JSON as an interactive, collapsible tree. Expand or collapse any branch, see type and array-length badges, search keys and values with live highlighting, and copy any node's value or its JSONPath in one click, all 100% in your browser.
YAML Formatter
Format, clean and re-indent YAML in your browser, or convert YAML ↔ JSON, with key sorting, flow/block style and the exact error line + column. Nothing is uploaded.
Comparisons & guides
Go deeper on the concepts behind the json validator.
JSON vs XML: Which Should You Use for Data Exchange?
ComparisonJSON is lean, fast to parse and the default for modern web APIs. XML is verbose but self-describing, with schemas, namespaces and rich validation. Here's the real trade-off.
Read the comparisonYAML vs JSON: Which Is Better for Config and Data?
ComparisonYAML is human-friendly with comments and clean indentation, ideal for config. JSON is strict, ubiquitous and data-exchange-ready. Here's when each wins, and the gotchas.
Read the comparisonHow to Format JSON (Pretty-Print & Validate)
GuideTurn a minified or broken JSON string into clean, indented, readable JSON, and catch syntax errors while you're at it. A quick step-by-step guide.
Read the guideHow to Convert CSV to JSON (Free, In Your Browser)
GuideTurn a spreadsheet or CSV export into a clean array of JSON objects, with the right headers as keys and correct data types. A step-by-step guide.
Read the guideCommon problems, solved
Hit a snag? Here are quick fixes for the issues people run into most.
Auto-fix didn't repair my file.
Auto-fix handles the common lenient cases, trailing commas, single-quoted strings/keys, // and /* */ comments, and unquoted keys. Structural errors like a missing closing brace, a truncated file or duplicated content can't be inferred safely, so it leaves them for you. Use the caret and Jump to error to fix those by hand.
It flags my JSON with comments as invalid.
Standard JSON (RFC 8259) has no comments, VS Code settings and tsconfig use a superset called JSONC. Turn on Auto-fix to strip the comments, or remove them manually, to get strict, portable JSON.
Valid JSON, but the depth looks higher than expected.
Depth counts every nesting level, so an array of objects that each contain an array is deeper than it feels. The stat measures the longest path from the root to a leaf. Use it to spot accidentally over-nested structures.
The caret points a column off from my editor.
We report 1-based line and column against the raw text. Tabs count as a single column here, whereas some editors render them as multiple visual columns, jump to the line and the caret lands on the exact character.
Get the most out of it
Turn on Auto-fix to convert JSONC (comments, trailing commas) into strict JSON in one click, then read the report to see what changed.
A parse error at the very end of the document is almost always a trailing comma or a missing closing brace or bracket.
Use the depth and key-count stats to catch accidentally over-nested or unexpectedly huge payloads before they hit production.
Press Ctrl/Cmd+Enter to re-validate and Esc to dismiss the error banner.
Single quotes are valid in JavaScript but not JSON, if a key or string uses them, Auto-fix will double-quote it for you.
What's new
Recent updates and improvements to the json validator.
Initial release: live RFC 8259 validation, precise line + column errors with an on-screen caret, plain-English diagnoses, jump-to-error and structure stats (keys, depth, counts, byte size, type breakdown).
Added lenient Auto-fix for trailing commas, single quotes, unquoted keys and comments, with a line-by-line report of every change applied.
Refined error diagnoses for NaN/Infinity literals and duplicate-key detection, plus drag-drop/paste import, shareable links and keyboard shortcuts.
Keep exploring
Problems we solve
Definitions
From the blog
- How to Generate TypeScript Types from JSON (API Responses Made Type-Safe)
- JSON-LD vs. Microdata vs. RDFa: Which Structured Data Format Should You Use?
- How to Fix Invalid JSON Errors: The Complete Troubleshooting Guide
- How to Convert CSV to JSON: Headers, Types, and Nesting Done Right
- What Is JSON and How to Read It: A Beginner's Guide
Explore categories
Compare formats
By file type
Common tasks
Your privacy is built in
Your JSON is validated entirely in your browser using its native JSON engine. It is never uploaded to any server. Nothing is stored, logged or transmitted, so you can safely paste payloads containing tokens, keys or personal data. Close the tab and every trace is gone.
- Runs in your browser
- No uploads
- Nothing stored
Ready to try the json validator?
Free, private and instant. JSON Validator runs right in your browser.