JSON Formatter, Validator & Converter
A browser-only JSON toolbox that keeps the everyday jobs in one place: format, minify, validate, sort, escape and tree view, plus diffing, format conversion and JSONPath queries.
Every parse and conversion happens inside your browser, so the JSON itself never reaches a server. If you spend your day pasting API responses, config files and log fragments, that matters more than any single feature.
Features
- Format & Minify — Pretty-print with 2-space, 4-space or tab indentation, or collapse to a single line and see the before/after size and compression ratio.
- Validation — Parse errors come back with a message and the exact position, plus a structural overview, so a missing quote or stray comma is easy to find.
- Recursive Sort — Sort the whole object tree alphabetically by key, ascending or descending — handy when comparing two config files.
- Escape & Unescape — Character-by-character escaping and unescaping of JSON strings, avoiding the edge cases that regex-based replacement runs into.
- Tree View — A collapsible tree that labels the type of every node, with one-click expand and collapse all.
- JSON Diff — Line-level comparison of two JSON documents; turn on semantic mode to ignore differences caused purely by key order.
- Format Conversion — Two-way conversion between JSON and CSV, XML and YAML, with a button to swap the direction.
- JSONPath Queries — Supports $.key, [*], the recursive .. operator, filters such as [?(@.price>100)], array slices and multi-index selectors.
How to use
- Paste or type your JSON in the editor on the left, or click "Sample" to load demo data.
- Pick a tab on the right: Basic, Diff, Convert or JSONPath.
- Under Basic, click Format, Minify or Validate; the output appears in the result panel below.
- Diff and Convert need two inputs — fill in both sides as prompted, then run.
FAQ
Is my JSON uploaded anywhere?
No. Parsing, formatting, diffing and conversion are all done by JavaScript in your browser, and the page contains no code that sends JSON to a backend. You can keep using these features offline once the editor dependency has loaded.
Validation fails, but the JSON looks fine. Why?
The four usual suspects are a trailing comma after the last item of an object or array, single quotes instead of double quotes, a literal newline inside a string that was never escaped, and an invisible BOM at the start of the file. The error message includes the position, so moving the cursor there usually reveals the problem.
How is JSON different from a JavaScript object literal?
JSON requires double-quoted keys, forbids trailing commas and comments, and has no undefined, functions or single-quoted strings. Object literals allow all of those, which is why copying an object straight out of JavaScript source often fails validation.
How large a JSON document can it handle?
That depends on the memory your browser has available; a few tens of megabytes is normally fine. For hundreds of megabytes, reach for a command-line tool such as jq — the browser editor gets noticeably sluggish at that size.