JSON Tools
Format, validate, view, diff, minify, and convert JSON. Everything runs locally in your browser.
Tools
JSON Formatter
Format, beautify, and validate JSON.
JSON Validator
Check JSON syntax with precise errors.
JSON Viewer
Explore JSON as a collapsible tree.
JSON Minifier
Compress JSON to a single line.
JSON Diff
Compare two JSON documents.
JSON to CSV
Convert an array of objects into CSV.
CSV to JSON
Convert CSV back into JSON.
JSON to YAML
Convert JSON to readable YAML.
YAML to JSON
Convert YAML back to JSON.
JSON Escape / Unescape
Escape text into a JSON string literal.
JSON Schema Validator
Validate JSON data against a supported JSON Schema vocabulary.
JSONPath Tester
Test JSONPath expressions against JSON documents locally.
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 flattens nested object paths into columns, serializes arrays and deeper objects inside cells, and leaves null or missing values empty. For example,{"a":{"b":1},"list":[1,2]} produces columns a.b and list, with cells 1 and [1,2]. Converting to or from YAML supports nested structures, but this converter still interprets supported unquoted numbers and booleans: 1.20 becomes 1.2 and true becomes a boolean. Values such as yes, on, and 2026-10-21 stay strings under its schema. Quote a version or identifier to preserve its spelling, and review the result when a round trip matters.
When to use JSON Escape
JSON Escape encodes text as a JSON string literal or decodes that literal back to text. Use Formatter when you are working with a JSON document; use Escape when a JSON value needs to contain that document as a string. JSON escaping is not HTML, URL, or shell quoting. Follow the destination format's rules instead of assuming an escaped JSON string is safe in every context.
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?
- This converter flattens nested object paths into columns such as a.b. Arrays, empty objects, and objects beyond the flattening depth are serialized as JSON inside a cell, rather than truncated. Null and missing values become empty cells. Inspect the column mapping before using the CSV in another system.
- Why do numbers or booleans change after YAML to JSON conversion?
- This converter uses a JSON-compatible YAML schema with numeric safety checks. Plain true becomes a boolean and 1.20 becomes the number 1.2, but yes, on, and a date such as 2026-10-21 remain strings. A leading-zero number such as 021 is read as decimal 21. Quote version strings or identifiers when their exact spelling matters; unsupported numeric ranges are refused.
- 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?
- Behavior depends on the operation. The token-preserving Formatter and Minifier retain duplicate member names, and the syntax-only Validator does not rewrite the document. Tools that parse data into JavaScript objects keep the last occurrence. Use unique property names when you share data so downstream systems do not interpret it differently.