JSON viewer — format, validate & explore
Validate JSON as you type, then beautify, minify, sort keys, explore a collapsible tree with JSONPath copy, strip JSONC comments, or convert to YAML, CSV or a query string. Everything runs locally — your JSON never leaves your browser.
What is a JSON viewer?
A JSON viewer is a tool that parses a piece of JSON text, validates it against the JSON specification (RFC 8259), and presents it in a more readable form — pretty-printed with indentation or rendered as a collapsible tree — so developers can read API responses, debug configs and spot mistakes quickly.
Key features at a glance
- Live validation with parser-position jump to error, plus depth, key, type and byte stats.
- Beautify with 2-space, 4-space or tab indentation, minify to one line, and sort object keys recursively.
- Collapsible tree view with colour-coded values, key/value search, and one-click copy JSONPath.
- JSONC support: strip
//and/* */comments, strip trailing commas, escape and unescape JSON string literals. - Convert JSON to YAML, CSV (array of flat objects) or a URL query string — copy or download as
.json.
Format
Sort
Clean
Convert
Depth
0
Total keys
0
Array items
0
Root type
—
Strings
0
Numbers
0
Booleans
0
Nulls
0
Raw size
0 B
Minified
0 B
Beautified
0 B
Nothing leaves your browser
Parsing, formatting and tree rendering all run on-device. Your JSON — including any secrets or PII — is never uploaded.
Tree view with JSONPath
Collapsible objects and arrays, colour-coded values, and a one-click copy path on every leaf — paste straight into jq, code or tests.
Beautify, minify, convert
2-space / 4-space / tab indentation, recursive key sort, JSONC comment stripping, trailing-comma cleanup, plus YAML / CSV / query-string output.
How to use the JSON viewer
-
1
Paste, drop or load a sample
Paste JSON into the textarea, drag a
.jsonfile onto it, or click Load sample JSON. The validator runs after every keystroke (debounced) so you see green or red within 200 ms. -
2
Read the validation result
Valid JSON shows a green Valid JSON chip and a stats grid (depth, keys, type counts, byte sizes). Invalid JSON shows a rose banner with the parser error and a Jump to error link that drops your cursor on the failing character.
-
3
Format, clean or convert
Beautify with 2 / 4 / tab indentation, minify to one line, sort keys recursively, strip JSONC comments or trailing commas, or convert the value to YAML, CSV or a URL query string.
-
4
Explore the tree, copy or download
Switch to the Tree tab to expand objects and arrays. Hover any leaf for copy value and copy path (JSONPath) buttons. When you're done, Copy result or Download .json.
Frequently asked questions
Is my JSON sent anywhere?
No. Parsing, formatting, tree rendering and conversion all run in your browser. The site uses Google Analytics for page-level visit counts only — the JSON you paste never leaves your device.
What does Jump to error do?
When JSON.parse fails, modern browsers include a character offset (Chrome / Edge) or line and column (Firefox / Safari) in the thrown message. The viewer parses that out and moves your textarea caret to the failing character.
What is JSONC and how does comment stripping work?
JSONC is JSON with comments — // and /* */ — used by VS Code settings.json, tsconfig.json and others. Strip comments walks the text token by token, leaves anything inside string literals untouched, and removes only the comment runs.
When can I convert JSON to CSV?
Only when the root is an array of flat objects, like [{"id":1,"name":"A"}, ...]. The viewer takes the union of keys as headers, escapes commas, quotes and newlines, and writes one row per object. Nested values become empty cells — flatten first if you need them.
How does the JSONPath copy work?
Every leaf in the tree view has a small copy path button. It builds a JSONPath-style string like $.users[0].name, escaping keys that aren't simple identifiers as bracketed quoted strings ($['weird-key']).
What's the difference between Escape and Unescape?
Escape wraps your current text in JSON.stringify so it becomes a single quoted string literal — handy for embedding JSON inside another JSON value or a code snippet. Unescape reverses the operation: if your textarea contains a quoted string, it parses it and replaces the textarea with the inner content.
Does the YAML converter handle every YAML edge case?
It produces clean YAML for the common shape — nested objects and arrays, strings, numbers, booleans, null. Strings with YAML-significant characters (:, #, leading dashes / whitespace) are quoted. It does not emit anchors, aliases or custom tags.
Will the tree view choke on huge JSON?
The whole tree is rendered up-front, so multi-MB files can feel slow on weaker machines. For most config files and API responses the tree is instant. For giant payloads, work in the textarea and use the search to find what you need.
Are my settings and last JSON remembered?
Yes — the textarea contents are saved to localStorage so they're there when you return. Click Clear or wipe browser site data to remove them.
How do I find errors in invalid JSON?
Paste your JSON and watch the status row. Invalid JSON turns rose and shows the parser’s exact message (e.g. Unexpected token } in JSON at position 142); click Jump to error to move your caret there. Common culprits are trailing commas after the last ,, unquoted keys, single quotes, comments, or unescaped newlines inside strings — Strip trailing commas and Strip comments fix the JSONC-style ones in one click.
What is the difference between beautifying and minifying JSON?
Beautify (also called pretty-print) adds indentation and line breaks so a human can read the structure — this tool offers 2-space, 4-space and tab variants. Minify strips every whitespace character outside string literals so the payload shrinks to its smallest legal form, ideal for API responses, embedded data or saving bandwidth. Both produce identical values when re-parsed.
Does this tool support JSON5?
Not as a first-class parser — the viewer uses the browser’s strict JSON.parse, which follows RFC 8259. The two most common JSON5 sins, however, are handled: click Strip comments to remove // and /* */, then Strip trailing commas. Unquoted keys and single-quoted strings are not auto-fixed; convert them in the text editor or paste valid JSON instead.
All Deals.Group tools
Image compressor, PDF merger, video tools, link generators — all browser-only.
Text Editor
Notion-style block editor — multiple files, autosave, all-local.
Case Converter
camelCase / snake_case / kebab-case JSON keys in a click — handy companion.
Character Counter
Word, character, reading-time and readability report for any pasted text.