JSON Parser
Parse and validate a JSON string. Instantly see if the JSON is valid and inspect the parsed structure.
What is a JSON parser?
A JSON parser reads JSON text and turns it into real structured data instead of a flat string. An object, an array, or a single value. That parse step is also the strictest validity check there is: if the text has a trailing comma, a single quote, an unquoted key, or a stray character, parsing fails and you get the exact position of the problem rather than a vague "invalid JSON" verdict.
Paste a JSON string into this tool and three things happen. You get a valid or invalid verdict. You get the type and shape of what was parsed: Object (4 keys), Array (12 items), string, number, boolean, or null. And you get the parsed value printed back with two-space indentation, laid out so it can be read. Double-encoded JSON is unwrapped as well, so if your input is a quoted string whose contents are themselves JSON, the tool keeps parsing until it reaches the real value and you never strip escaped quotes by hand.
When to use it
Nine times out of ten you're here because a payload arrived as a string instead of an object. A webhook body from a database column, a message off a queue, a log line captured by an agent: they show up with every quote escaped. Paste one here and the real object comes back in one step, instead of unescaping quotes by hand and hoping you got them all. The same thing happens with types. Config values from environment variables, YAML, or a form arrive as strings, and "port": "8080" and "port": 8080 look alike in a diff while behaving differently downstream. The badge names it: string or number. It answers the count question too: Array (12 items) beats counting brackets.
Run a pass before you ship JSON somewhere strict — a log pipeline, a config loader, an API request body. If it parses here, it parses there. Once you know it's valid and you want it laid out for reading or review, the JSON Formatter pretty-prints it with your choice of indentation. The JSON Stringifier does the opposite of this page, collapsing a document back onto a single line for the times you need to store it as text.
How this tool works
Your input is trimmed and handed to the browser's native JSON parser. That is the same parser your code uses, so a result here matches what your runtime will do. If parsing succeeds and the result is itself a string, the tool parses that string too, and keeps going until the result stops being parseable JSON. The final value is re-serialized with two-space indentation. Type and size are read off the parsed value to fill the badge.
That unwrapping applies to the document as a whole, not to individual fields. Say you parse an object and one of its properties holds stringified JSON. That property stays a string. Copy its value, paste it back into the input, and it unwraps on the next pass. There is a second consequence: because any string that parses is parsed again, an input of "12345" reports number, and "true" reports boolean. That is usually what you want when untangling encoded payloads, but if you need to inspect a string exactly as written, this behaviour will surprise you.
Everything runs client-side. No upload, no request, no log. That matters more here than on most pages, because the strings people need to untangle tend to be the ones lifted straight out of a webhook table or an error log, still carrying whatever identifiers were in them.
Examples
Validate and identify the shape
Input{"id":42,"active":true,"tags":["beta","internal"]}Output{ "id": 42, "active": true, "tags": [ "beta", "internal" ] }Valid. The badge reads Object (3 keys), and the indented output confirms id is a number and active a boolean, rather than the strings "42" and "true".
Double-encoded payload from a webhook column
Input"{\"user\":{\"id\":7,\"plan\":\"pro\"}}"Output{ "user": { "id": 7, "plan": "pro" } }The input is a JSON string whose contents are JSON. One parse would hand back the inner text still escaped. This keeps parsing until the real object appears, so you never touch the backslashes.
A quoted number is still a number
Input"12345"Output12345Because the parsed string parses again, the badge reports number rather than string. That helps when checking whether an ID survived a round trip as a number. It also means quotes you expected to see preserved will not be.
Invalid JSON with a position
Input{"name": "Ada", }OutputExpected double-quoted property name in JSON at position 16 (line 1 column 17)A trailing comma is legal in JavaScript and illegal in JSON. The error points at the exact character, so you fix the offset instead of re-reading the whole payload. Engines phrase this message differently — never match on its text.
Frequently asked questions
How do I check if a string is valid JSON?
Parse it. If it parses, it's valid, and no lighter-weight check is reliable. Paste the string above and you get a valid or invalid verdict immediately, with the parser's error message and character position when it fails. That position is usually enough to spot the culprit: a trailing comma, a single quote, an unquoted key, or a truncated payload.
Why does my JSON have a backslash before every quote?
Because it was encoded twice. Something serialized an object that was already a JSON string, so the inner quotes got escaped to survive being stored as text. Webhook bodies kept in database columns do this, and so do queue messages, log fields, and anything that passed through a system treating JSON as opaque text. Paste the whole thing here and the tool unwraps every layer until it reaches the real object.
What is the difference between a JSON parser and a JSON formatter?
A parser converts JSON text into a value and reports whether it's valid and what type it is. A formatter takes JSON that is already valid and re-lays it out for reading. Use this page to confirm validity, inspect a type, or unwrap an escaped payload. Use the JSON Formatter when the JSON is fine and you want it indented and readable.
How do I tell whether a JSON value is a number or a string?
Parse it and read the type off the badge. 8080 and "8080" look near-identical but behave differently in comparisons, sorting, and strict schemas. This tool names the type of the parsed value outright: string, number, boolean, null, Object (n keys), or Array (n items). For a value nested inside an object, copy that value on its own and parse it separately.
Can I get a custom version of this for my team?
Yes. That is the kind of work Zinc Online Solutions does. If your team keeps hand-untangling encoded payloads, validating fixtures, or checking types across services, we build internal tools and automations that run against your own schemas and data sources. Send us a sample of what you keep untangling and we'll scope it.