Skip to content
Browser tool Runs locally

JSON Tools

Format, validate, view, diff, minify, and convert JSON. Everything runs locally in your browser.

Tools

Formatter vs. JSON Viewer

Both take the same input, but they're built for different tasks. JSON Formatter re-indents (or minifies) the text itself, which is what you want when you need to copy the result somewhere else, paste it into a file, or diff it later. JSON Viewer renders the same data as a collapsible tree, which is better for exploring an unfamiliar or deeply nested payload, like an API response, without scrolling through hundreds of flat lines.

Working with CSV and YAML

JSON's nested, variable-shape structure doesn't map cleanly onto either format. Converting to CSV only works cleanly for a flat array of objects with consistent keys; nested objects or arrays inside a field get stringified or truncated, since CSV has no way to express structure beyond rows and columns. Converting to or from YAML is more reliable for structure, but YAML's parser guesses types from unquoted values, so a version string like 1.20 or a value like no can silently turn into a number or boolean on the way through. When the exact round-trip matters, check the result rather than assuming it matches.

When to use JSON Escape

JSON Escape isn't for making JSON readable, it's for embedding a JSON string safely inside another string: a JS string literal, a shell command, a log line, or a config value that itself needs to hold JSON as text. Use the Formatter when you're working with the JSON document itself; use Escape when that document needs to be wrapped inside something else.

Frequently asked questions

Does the JSON Validator do anything the Formatter doesn't?
The Validator only reports whether the input is syntactically valid JSON and where it breaks. The Formatter performs the same check but also returns re-indented (or minified) output, so use the Validator when you just need a pass/fail on a script's output, and the Formatter when you need to read or reuse the result.
Why did JSON to CSV produce blank or stringified cells?
CSV is flat, JSON isn't. A nested object or array inside a field gets flattened, stringified, or dropped depending on how deep it goes, since there's no column structure to represent it. Flatten nested data yourself first if you need every field to survive the conversion.
Why do numbers or booleans change after YAML to JSON conversion?
YAML's parser infers types from unquoted values: yes, on, and true can all become the boolean true; a value like 021 can be read as octal; dates without quotes can become timestamp objects. Quote any YAML value you need preserved exactly as a string.
Does the JSON parser accept comments or trailing commas?
No. These tools parse strict JSON (RFC 8259). JSON5 and JSONC, which allow comments, trailing commas, and unquoted keys, will fail validation here. Strip that syntax before pasting if your source is a JSONC config file.
What happens with duplicate keys in an object?
JSON's spec doesn't forbid duplicate keys, but it also doesn't define which one wins. These tools follow standard JS parsing behavior and keep the last occurrence, silently discarding earlier ones, so it's worth checking your source for duplicates rather than relying on any particular tool's behavior.