IT
OmnvertImage • Document • Network

JSON Viewer & Formatter — Pretty Print, Tree, Minify | Omnvert

See your JSON clearly with formatting, tree navigation and copy/export buttons.
Stats
Total keys: 8
Max depth: 3
Arrays: 1
Objects: 3
Approx size: 168 B
Paste JSON
Tree view
OK
Matches: 0
user
Object
id
42
name
"Ada Lovelace"
roles
Array(2)
[0]
"admin"
[1]
"editor"
active
true
meta
Object
plan
"pro"
expires
"2025-01-01"
Smart helpers
  • Detect Base64-looking fields and decode to text (or warn when binary).
  • Use JSONPath to highlight and filter large JSON: $.data.items[*].id
  • Quick stats: keys, depth, arrays/objects, and approximate size.

About

See your JSON clearly with formatting, tree navigation and copy/export buttons.

Formatting JSON is a display decision, not a change to the data. Whitespace between tokens carries no meaning, so a pretty-printed document and its minified twin parse to identical values. Indent with two spaces when a human has to read the payload or when the file lives in git and you want line-level diffs. Minify when the bytes travel over a network or land in a database column. Compression narrows the gap but does not close it: gzip still has to move and decompress the padding you added.

Strict JSON is a much smaller language than most people remember. Keys and strings need double quotes, single quotes are invalid, keys cannot be bare identifiers, comments do not exist, and a trailing comma before } or ] is a parse error. The overwhelming majority of pastes that fail are JavaScript object literals rather than JSON — perfectly legal in a .js file, rejected the moment JSON.parse touches them. A parser that reports line and column turns that into a five-second fix instead of a hunt.

Several values that feel numeric have no representation at all. NaN, Infinity and -Infinity are not JSON, and JSON.stringify silently converts each of them to null. undefined behaves differently depending on where it sits: as an object property it and any function value are dropped entirely, while inside an array they become null, so [1, undefined, 3] serializes to [1,null,3] and quietly changes shape. Date objects become ISO 8601 strings and never come back as dates without a reviver.

Large integers are the failure that survives all the way to production. JSON numbers are parsed into IEEE-754 doubles, so anything above 9007199254740991 loses precision: a 19-digit snowflake ID or a Postgres bigint comes back rounded, usually with the last two or three digits wrong. Nothing throws — you just get a value that no longer matches any row. The fix is at the producer: serialize the identifier as a string, or use a parser that maps large integers to BigInt.

Deep documents are where a tree view earns its place. A Kubernetes manifest or a Stripe webhook nests eight or ten levels down, and reading that as raw text means counting braces. Collapse the branches you do not care about, expand the one you do, and use a path expression to jump straight to the field in question. Sorting keys is worth mentioning too: alphabetical order makes two dumps of the same object diff cleanly, but never re-serialize a payload whose signature you still need to verify — HMAC checks run against the exact raw bytes, and reordering keys invalidates them.

Encoding problems show up as mojibake or as escapes you did not expect. RFC 8259 requires UTF-8 for JSON exchanged between systems, and a byte-order mark at the front of a file is not part of the grammar — many parsers reject it outright, which is why a config file that looks perfect fails on line 1, column 1. Non-ASCII characters may appear literally as é or escaped as \u00e9; both are valid and equivalent. Characters outside the Basic Multilingual Plane, emoji included, are written as surrogate pairs like \ud83d\ude00.

JSON5 and JSONC exist because people kept wanting comments. VS Code reads .vscode/settings.json and tsconfig.json as JSONC, so // notes and trailing commas are accepted there — by that specific parser. package.json is strict JSON and will break npm if you annotate it. Knowing which dialect a file is in matters before you paste it into a validator: a JSONC file reported as invalid is not necessarily broken, it is simply being judged by the stricter grammar.

The everyday use is unglamorous and constant. An API returns a wall of text on one line and you want to see the shape of it. A response that should be JSON is actually an HTML error page, and pretty-printing it tells you that instantly. A field that should hold an object holds a string containing JSON, because something double-encoded it on the way through a queue. Before committing a config file — a CI pipeline, a service manifest, a locale bundle — a validation pass costs a few seconds and beats finding the trailing comma from a failed deploy log.

FAQ

What does Format do?
It pretty-prints JSON with indentation and optional key sorting for deterministic diffs.
How do I find parse errors?
We show line and column from the parser to jump to the exact issue.
Can I minify JSON?
Yes. Minify strips whitespace while keeping content identical.
Is the viewer safe?
Values render as text; no eval or script execution is used.
Can I export?
Use Copy formatted or Download .json to move results into your project.
Can it detect Base64 strings inside JSON?
Yes. When a string looks like Base64, the viewer shows a Decode Base64 action next to it.
What happens when Base64 decodes to binary?
We warn that the decoded bytes are not valid UTF‑8 text (binary detected) and suggest opening the Base64 tool for file-safe decoding.
Do you support Data URIs in JSON?
Yes. data:<mime>;base64,... strings are treated as Base64 and can be decoded.
How do I search a large JSON quickly?
Use JSONPath to highlight matches, then enable Only show matches to filter the tree to the relevant parts.
Which JSONPath features are supported?
This is a lightweight JSONPath: $, .prop, ['prop'], [index], and [*] wildcards.
Why is a trailing comma a parse error when my editor accepts it?
The JSON grammar has no optional trailing comma, so {"a": 1,} is invalid everywhere strict JSON is expected. Your editor is likely treating the file as JavaScript or JSONC, both of which allow it. Remove the comma before the closing brace or bracket, or confirm the consumer of the file actually parses the relaxed dialect.
Can I use single quotes for strings and keys?
No. JSON only recognizes double quotes, for keys and for string values alike, and unquoted keys are invalid too. This is the single most common reason a pasted JavaScript object literal fails to parse. A find and replace is risky if any value contains an apostrophe, so re-export the data properly when you can.