How to use JSON Bench
- Load a document. Paste JSON into the Input box on the Format & validate panel, or drop a
.jsonfile onto it. Nothing is uploaded - the file is read with the browser's own file reader. - Format or validate. Press Ctrl/Cmd + Enter, or select Format. Choose an indent of 2, 4 or 8 spaces or a tab, and turn on Sort keys to order every object alphabetically. If the document is invalid, the Output pane shows the line, the column, a caret under the exact character and an explanation of what JSON expected there.
- Explore the tree. Open the Tree panel to walk the document. Each row carries a type badge, the number of nodes in that subtree and its size in bytes. Select the path button on any row to copy a JSONPath such as
$.users[0].emailto your clipboard. - Query it. On the Query panel, type a JSONPath such as
$..items[?(@.price > 100)]. Matches update as you type. Switch the mode to Filter every node to test one expression against every value in the document at once. - Compare two documents. Paste one document on each side of the Diff panel and select Compare. The result is a structural diff: added, removed and changed keys, with a count of each.
- Convert. The Convert panel turns the loaded document into CSV, YAML, or a set of TypeScript interfaces inferred from the sample. Copy the result or download it as a file.
- Clear when you are done. The Clear button empties the editor and erases the copy of your document that is kept in localStorage.
Features
- Precise validation errors. Exact line and column, a caret under the offending token, and a plain-English explanation - including specific messages for trailing commas, single quotes, comments, Python's
True/None, unescaped control characters and a leading byte-order mark. - Pretty-print and minify. Configurable indent, optional deep key sort, and one-key minify.
- Virtualized tree. Collapsible rows with type badges, per-subtree node counts and byte sizes, and a copy-path button that yields a valid JSONPath.
- JSONPath and filter queries. Recursive descent, slices, unions, and filter expressions with comparison, logical, regular-expression and function support - evaluated by a hand-written parser, with no
evalanywhere. - Structural diff. Objects matched by key and arrays matched by longest common subsequence, so reordering keys or reindenting a file produces no noise.
- Converters. JSON to CSV with RFC 4180 quoting and a union of dot-path columns, JSON to YAML, and TypeScript interface generation with optional properties and unions inferred from a sample.
- Web Worker parsing. A 20 MB document parses without blocking the interface, and the worker keeps the parse tree so the page only ever holds the rows it is drawing.
- Keyboard first. Ctrl/Cmd + Enter formats, Ctrl/Cmd + K opens the command palette, and every control is reachable with Tab.
- Dark by default, light on request. The theme toggle is in the header and the choice is remembered.
- Offline and private. No backend, no upload, no account. A service worker caches the page so it keeps working after the first load, even with the network switched off.
Privacy
JSON Bench has no server component and no upload endpoint. Every document you paste, drop, format,
query, diff or convert is processed by JavaScript running inside your own browser tab, in a Web Worker
that contains no networking code. The page keeps your most recent document and your settings in
localStorage on your own machine so it can restore them when you come back, and the Clear
button erases both. The only data that leaves your browser is anonymous page-performance and
traffic-source information reported by the analytics SDK - how the page performed and how you arrived,
never what you pasted. The full detail is on the privacy page.
Frequently asked questions
Is my JSON uploaded anywhere?
No. JSON Bench has no backend and no upload endpoint. Parsing, querying, diffing and converting all happen in your browser tab, in a Web Worker that has no network code in it at all. The only thing that leaves the page is anonymous performance and traffic-source data from the analytics SDK, which records how you arrived and how fast the page loaded - never the content of your document. Your last document and your settings are kept in localStorage on your own machine so the page can restore them, and the Clear button erases both.
How large a file can JSON Bench handle?
A 20 MB document is the design target. Parsing happens in a Web Worker, so the interface keeps responding while the document is read, and the worker keeps the parse tree instead of handing it to the page. The tree panel asks for one page of rows at a time and draws only the rows that are actually on screen, so a document with a million nodes renders the same handful of rows as a small one. Above roughly 1 MB the editor switches to a read-only preview of the first part of the document, because a textarea holding 20 MB of text is slow in every browser.
What query syntax does the Query panel accept?
JSONPath, plus a small filter language. Paths support $, .key,
['key'], [0], negative indexes, [*], slices such as
[1:5], recursive descent with ..key, unions such as [0,2,'name'],
and filters such as [?(@.age > 30)]. Filter expressions support ==,
!=, <, <=, >, >=, a regular
expression match with =~ /pattern/, the operators &&, ||
and !, and the functions length, type, contains,
startsWith, endsWith, lower, upper, abs
and int. The parser is hand-written: there is no eval and no
new Function anywhere in JSON Bench, so a pasted query is treated as data, never as code.
How is the Diff panel different from a text diff?
A text diff compares lines, so reindenting a file or reordering the keys of an object shows up as hundreds of changes even though nothing structural moved. JSON Bench compares the two documents as trees. Objects are matched by key, so key order is irrelevant, and arrays are matched with a longest-common-subsequence pass, so inserting one element at the front does not mark every later element as changed. The summary counts added, removed and changed keys at the point where the change actually is, not once for every ancestor above it.
How was this tool made?
JSON Bench was generated and deployed from a single prompt on Quodara, an AI agent platform that turns a written specification into a deployed web app. The prompt described the five panels, the performance targets and the privacy rules; the agent wrote the parser, the JSONPath engine, the diff, the converters, the interface and the deployment configuration, then shipped it. You can read the prompt and the full write-up on the Quodara showcase page for this build at https://quodara-ai.com/showcase/json-bench/.
About this build
This page was generated from a single prompt on Quodara and deployed on . The whole tool is 57 KB transferred on a cold load, of which 43 KB is JavaScript, with no third-party runtime dependencies and no blocking external scripts. Everything you see - the JSON scanner, the JSONPath engine, the structural diff, the converters and this page - was written in one pass by the agent, then checked against a unit-test suite that ships in the repository. The full write-up, including the prompt that produced it, is at quodara-ai.com/showcase/json-bench.