A laptop, a phone and a hand writing in a notebook on a wooden desk, banner image on the JSON Data Studio page

Werkzeuge / Build suite

JSON Data Studio

Validate, repair, explore and reshape JSON in one place, then take it away as a schema, TypeScript types or CSV.

Paste JSON and learn what is wrong with it, down to the line and column. Repair the usual mistakes with a visible list of every change. Then query it, browse it as a tree or a table, infer a schema, flatten it for a spreadsheet or a config file, and export. Everything runs in your browser. Nothing is uploaded or saved.

Open the toolWhat is insideWhat it cannot do
Screenshot of the JSON Data Studio tool

What is inside

What is inside the tool.

Strict validation with a location

The scanner follows the JSON grammar and reports the line and column, what it expected, and the line with a marker under the problem.

Repair with a change list

One button fixes trailing commas, single quotes, unquoted keys, Python True, False and None, and comments. It tells you exactly what it changed, for example "2 trailing commas removed", and asks you to check the result. It never changes the data silently.

Duplicate keys

Most parsers keep the last value and drop the rest without a word. The studio lists each duplicated key and its path before you rely on the data.

Format, minify, sort, escape

Two spaces, four spaces or tabs. Sort keys at every depth. Escape a document into a JSON string and unescape it back, handy for payloads stored inside other payloads.

Query with a JSONPath subset

Use $.users[?(@.logins > 10)].name, slices like [0:2], negative indexes, wildcards, recursive ..key and filters with and, or and comparisons. No code is evaluated. Plain paths such as users[0].name also work.

Tree, table, schema, stats

Click a tree node to query it. Arrays of objects become a sortable, filterable table with CSV export. Infer a JSON Schema or TypeScript types, or read counts of keys, depth and value types.

Flatten and unflatten

Turn nested JSON into one level of path keys and back. Keys that contain dots or brackets are escaped so the round trip is exact. We test 1,500 random documents with awkward keys. If two paths would collide, flatten stops and says which.

CSV that is safe to open

Values that start with = + - or @ get a leading apostrophe by default so a spreadsheet does not run them as formulas. Switch it off if you need raw values.

Worked example

The sample on the tool page, five ways.

Click Sample. It holds three users, some with optional fields, plus a meta object. Here is what each view tells you.

ViewWhat you doWhat you see
Query$.users[?(@.logins > 10)].nameAda and Grace. Linus has 3 logins.
Query$..logins41, 17 and 3, found at any depth.
TableClick the logins headerLinus first, then Grace, then Ada. Filter "ada" leaves 1 of 3 rows.
SchemaOpen the schema tabname, role and logins are required. email and tags are optional because not every user has them. logins is an integer.
TypeScriptSame tabemail?: string and tags?: string[] on the user type.

Repairing broken JSON

The mistakes it knows, and the ones it will not guess.

ProblemWhat the repair does
Trailing commaRemoved.
Single-quoted stringsConverted to double quotes.
Unquoted keysQuoted.
True, False, NoneChanged to true, false, null.
// and /* */ commentsRemoved.
Missing brackets, truncated text, anything elseNot guessed. You get the line and column instead.

Repair makes the text valid. It cannot know what you meant, so read the change list before you use the result.

How to use it

Five steps.

Step 1

Paste JSON or open a file. The status line says Valid, or gives the line and column of the first problem.

Step 2

If it is invalid and the cause is a common one, press Repair and read the list of changes.

Step 3

Use Query or Tree to find the value you need. Click a tree node to get its path.

Step 4

For a list of records, open Table, sort and filter, then copy or download CSV.

Step 5

Generate a schema or TypeScript types, or flatten the document for a flat config.

What it cannot do

Limits.

The query language is a subset

It covers the common JSONPath features listed above. It does not support script expressions, unions like [0,2], or functions. Different JSONPath tools disagree on edge cases, so check results that matter.

Inferred schemas are a draft

A schema inferred from one sample describes that sample. It cannot know a field is an enum, or that a string is a date. Review it before you enforce it.

Large numbers

Numbers such as 12345678901234567890 or 0.12345678901234567 are kept exactly as written in the tree, table, query, schema, CSV and every format operation, and a line under the status says how many there are. A query like @.id==12345678901234567890 compares the full digits, and the schema calls a long whole number an integer. Exponents longer than 9 digits and numbers longer than 10,000 digits are the limit: for those inputs the tool shows the limit instead of views, query and CSV, and leaves your input unchanged, so nothing is rounded.

Duplicate keys are reported, not preserved

After a duplicate, the last value wins, as in every browser parser. The warning is there so you can fix the source.

Big inputs

A 2 MB array of 30,000 objects loaded in about half a second in our test. The tree shows the first 200 children of each node and the table draws the first 500 rows, with a note when it cuts. CSV export has all rows.

Not a validator against your schema

It infers a schema. It does not check a document against one you supply.

What it does

What it does.

Free JSON formatter, validator and repair tool: line and column errors, visible auto-repair, JSONPath-style query, tree and table views, sort and filter, schema and TypeScript inference, flatten and unflatten, CSV export. It runs in your browser.

FunctionWhat it does here
Validate with a locationLine, column and marker
Fix common errorsYes, with a list of every change
Other formats (XML, YAML, and more)No, JSON only
SharingNo link, no upload

Their FAQ says data saved without a login becomes public. Here nothing is saved or shared.

Reading the result

What each readout means.

The status line

"Valid JSON" with the size in bytes, or the error with its line and column. When it is not valid, the repair row lists every change it would make before you accept any of them.

Tree, Query, Table, Schema, Stats

Tree shows the structure. Query shows "N results" for your path. Table lays an array of objects out in columns. Schema and Stats describe what is in the data you pasted.

Schema is inferred

It describes the sample you pasted, not every document your system may produce. A field missing in the sample will be missing from the schema.

Exports

The CSV is built from the rows and columns of the Table tab. The box "Protect CSV from spreadsheet formulas" is ticked by default, so a cell that starts with =, +, - or @ gets a leading apostrophe and a spreadsheet will not run it as a formula. That changes the cell text. Untick the box if you need the raw values. Nothing is saved or sent.

Common mistakes

What goes wrong, and what the tool does about it.

Trusting a repair without reading it

Pressing Repair on {a:1,'b':True,c:None,d:[1,2,],} fixes it, and the note lists what changed: trailing commas, single quotes, unquoted keys, Python values, comments. A repair makes the text valid, not correct. Check the list against what you meant.

Duplicate keys

{"a":1,"a":2} is valid JSON, and parsers keep the last value. The tool names each duplicated key and its path so the first value is not lost without notice.

Long numbers in ids

12345678901234567890 stays exact in every view and export, so you can query and export it as a number. Past the stated limits (exponents over 9 digits, numbers over 10,000 digits) the tool shows the limit and produces no views or exports, so nothing is rounded.

Query syntax from other tools

Paths like $.a[0].b, $.a[*].b, $..b, $.a[-1], $.a[0:1] and filters such as $.a[?(@.b>1)] work. A form it does not support, such as $.a[b=2], gives an error naming the position instead of an empty result.

Spreadsheet formulas in CSV

A value starting with =, +, - or @ can run as a formula when the CSV is opened in a spreadsheet. The Protect CSV from spreadsheet formulas box is on by default and prefixes such values with an apostrophe. Turn it off only for data you trust.

An inferred schema is a draft

The schema and TypeScript types come from the values in this one document. A field that is always present here may be optional elsewhere. Review them before you rely on them.

Questions

Before you ask.

Is my JSON uploaded?

No. Parsing, repair, queries and exports run in your browser tab. Opening a file reads it locally.

Does it store my last input?

No. Close the tab and it is gone.

Why does repair show a list instead of just fixing it?

Because an automatic fix can change meaning. You should see every change.

Why does flatten fail with a collision?

Two different paths would produce the same key, so one value would overwrite another. The tool stops and names them.

Can I query with a plain path?

Yes. users[0].name works as well as $.users[0].name.

What does it cost?

Nothing. No account.

Your data

What stays on your device.

The tool runs in this browser tab. It does not need a server to do its job. The JSON you paste stays in the page. Nothing is copied, downloaded or shared unless you press the button for it.

Keep going

Other tools you may want next.

Try it

Paste your JSON and see what is in it.

Open JSON Data Studio
A wooden desk with glasses, a coffee cup, a plant and the edge of a laptop, banner image on the JSON Data Studio page

Try it now.

JSON Data Studio runs in your browser. No account needed.

Input To Output

Paste in, five views out

JSON text,pasted or froma fileTree, Query,Table, Schemaand StatsValid JSON,size in bytesErrors withline, columnand a caretJSON DataStudioInOut
InJSON text, pasted or from a fileJSON DataStudioTree, Query, Table, Schema andStatsValid JSON, size in bytesErrors with line, column and acaretOut
Valid JSON fills every view.

Pipeline

What happens as you type

150 ms after youstop typingThe text isscanned and parsedAny error islocated by lineand columnValid JSON fillsall five views
150 ms after you stop typingThe text is scanned and parsedAny error is located by line andcolumnValid JSON fills all five views
No run button.

Bar Compare

The sample document in three forms

As typed302 bytesMinified302 bytesPretty, 2 spaces515 bytes
As typed302 bytesMinified302 bytesPretty, 2 spaces515 bytes
Same data, different spacing.

Support Matrix

The five views

Rebuilds asyou typeWholedocumentCopy buttonDownloadbuttonReacts toclicksTreeQueryTableSchemaStats
TreeRebuilds as you typeWhole documentReacts to clicksQueryRebuilds as you typeCopy buttonDownload buttonTableRebuilds as you typeCopy buttonDownload buttonReacts to clicksSchemaRebuilds as you typeWhole documentCopy buttonStatsRebuilds as you typeWhole document
What each one offers.

Before After

Sort keys

As typedSortedTop level: users then metaUser keys: name, role,logins, tagsLinus keys: name, role,logins, emailmeta then userslogins, name, role, tagsemail, logins, name, role
As typed to SortedTop level: users then metameta then usersUser keys: name, role, logins, tagslogins, name, role, tagsLinus keys: name, role, logins,emailemail, logins, name, role
Alphabetical at every level.

Before After

Flatten and unflatten

NestedFlat path keysmeta: count 3, nested ok,ratio, noteUnflatten those keysA key clashing with a deeperonemeta.count, meta.nested.ok,meta.nested.ratio,meta.nested.noterebuilds the nested objectan error; nothing waschanged
Nested to Flat path keysmeta: count 3, nested ok, ratio,notemeta.count, meta.nested.ok,meta.nested.ratio, meta.nested.noteUnflatten those keysrebuilds the nested objectA key clashing with a deeper onean error; nothing was changed
One key per leaf, and back.

Before After

Broken JSON in, valid JSON out

In the pasteThe repair1 line comment3 single-quoted stringsTrue, a Python literal1 trailing commaRemovedConverted to double quotesConverted to trueRemoved
In the paste to The repair1 line commentRemoved3 single-quoted stringsConverted to double quotesTrue, a Python literalConverted to true1 trailing commaRemoved
One paste, four kinds of fix.

Before After

A syntax error, located

PasteShownThe scan stopsThe messageBelow the source lineLine 1, column 8Trailing comma before }A caret points at the comma
Paste to ShownThe scan stopsLine 1, column 8The messageTrailing comma before }Below the source lineA caret points at the comma
The paste {"a":1,}.

Before After

Duplicate keys

PasteResultThe key a appears twiceThe document still parsesThe first valueA warning: duplicate key ain $Valid JSONis lost; parsers keep thelast
Paste to ResultThe key a appears twiceA warning: duplicate key a in $The document still parsesValid JSONThe first valueis lost; parsers keep the last
The paste {"a":1,"a":2}.

Before After

Query syntax

PathResult$.users[0]$.users[-1]$.users[1:3]$..name$.users[*].rolethe first userthe last userGrace and Linusevery name, 3 matchesadmin, editor, viewer
Path to Result$.users[0]the first user$.users[-1]the last user$.users[1:3]Grace and Linus$..nameevery name, 3 matches$.users[*].roleadmin, editor, viewer
Against the sample document.

Input To Output

A filter query

$.users[?(@.logins> 10)].nameThe sampleusers2 results$.users[0].nameis Ada$.users[1].nameis GraceQuery viewInOut
In$.users[?(@.logins > 10)].nameThe sample usersQuery view2 results$.users[0].name is Ada$.users[1].name is GraceOut
The query that ships in the box.

Pipeline

A filter, piece by piece

$ the wholedocument.users picks thearray?(@.logins > 10)keeps matchingitems.name takes eachname2 results: Ada andGrace
$ the whole document.users picks the array?(@.logins > 10) keeps matchingitems.name takes each name2 results: Ada and Grace
How the path reads.

Bar Compare

Logins in the sample

Ada41 loginsGrace17 loginsLinus3 logins
Ada41 loginsGrace17 loginsLinus3 logins
What the filter compares.

Before After

CSV export

TableCSV lineAda rowGrace rowLinus rowAda,admin,41,"[""core"",""ops""]",Grace,editor,17,[],Linus,viewer,3,,linus@example.com
Table to CSV lineAda rowAda,admin,41,"[""core"",""ops""]",Grace rowGrace,editor,17,[],Linus rowLinus,viewer,3,,linus@example.com
The sample table as CSV.

Before After

The formula guard

Cell valueIn the CSV=2+3+44-7@mentionplain text'=2+3'+44'-7'@mentionplain text
Cell value to In the CSV=2+3'=2+3+44'+44-7'-7@mention'@mentionplain textplain text
On in the table view.

Input To Output

Schema view

The sampledocumentJSON Schema,draft 2020-12or TypeScript:type Root ={...}Optional keysmarked with ?Schema viewInOut
InThe sample documentSchema viewJSON Schema, draft 2020-12or TypeScript: type Root = {...}Optional keys marked with ?Out
Two dialects of the same shape.

Input To Output

Long integers stay exact

An integerwith 30 digitsKept exactlyas writtenNote: 1 numbertoo long for astandarddoubleJSON DataStudioInOut
InAn integer with 30 digitsJSON DataStudioKept exactly as writtenNote: 1 number too long for astandard doubleOut
No rounding to a double.

Pipeline

Tree to query

Click a key in thetreeIts path fills thequery boxThe view switchesto QueryResults show theirown paths
Click a key in the treeIts path fills the query boxThe view switches to QueryResults show their own paths
A shortcut between views.

Authored Tiles

The working limits

7 format operations5 views5 MB file limit200 query results shown atmost
7 format operations5 views5 MB file limit200 query results shown at most
From the code.