How to view an API JSON response as a table
Copy a response from your browser's network tab or from API docs and you often get hundreds of lines of JSON: objects holding arrays that hold more objects. Even with indentation you end up scrolling up to check which user an address belongs to. Turning the JSON into tables makes it much faster to read.
Why a table helps
Most API responses are arrays of objects with the same shape: users, orders, products. Lay such an array out as a table and each item becomes a row and each key a column, so you can compare records up and down like a spreadsheet.
- Keys that only some items have, or that are missing, stand out right away.
- Items with
nullvalues or empty arrays are easy to spot. - Sort by a price or date column to find the largest or most recent value.
Step by step
- Open your browser's developer tools (F12), go to the Network tab, pick the request, and copy the whole Response. If you already have a JSON file, just drop it in.
- Paste it into the JSON Grid Viewer below. The syntax is checked immediately and the table appears on the right.
- Badges such as
{3}or[12]mean there is an object or array inside that cell. Click one to open the inner table in place. - Click any cell to see its path, such as
$.data.users[2].address.city, while the matching line is selected in the input box.
Taking a path into your code
To read a deeply nested value in code you need the exact path. Click a cell, then Copy JS path to get an expression like data.users[2].address.city that works in JavaScript as is. Keys with hyphens or spaces are written in bracket form, such as data["user-name"]. If your test tool or library expects JSONPath, use Copy JSONPath instead.
Moving just one table into a spreadsheet
Every table has CSV and Copy table buttons at the top. They export only that table, not the whole response. Click CSV on the users table, for example, and you get a clean file with just the user list. If you have filtered rows with the search box or sorted a column, the export follows that result.
- CSV saves a file that opens in Excel with non-English text intact.
- Copy table copies tab-separated text. Paste it into Excel or Google Sheets and the columns line up.
Common traps
Big numbers that change. Integers longer than about 16 digits, such as order numbers or social media IDs, lose their last digits when they pass through JavaScript's JSON.parse. For example, 9007199254740993 becomes 9007199254740992. This tool reads the source directly, shows numbers exactly as written, and warns you when such numbers are present. If you see the warning, it is safer to send those values as strings.
Duplicate keys. An object like {"id": 1, "id": 2} is not a syntax error, but most programs keep only the last value, and servers handle it differently, which makes it an easy source of bugs. The tool points out where such keys are.
Logs with one object per line. Many log files use JSON Lines, with one JSON object on each line. Paste such a file as is and you get a table with one row per line.
For indenting, minifying, or converting CSV to JSON, use the JSON Formatter. Both tools process your data in the browser and never send it to a server.