This tool flattens nested JSON from an API into a flat table with one row per record and dot-path columns like user.name and scores[0]. APIs love nesting: a user object inside a response, an address inside the user, a list of scores inside that. Spreadsheets do not love nesting. Flattening turns each nested path into its own column so the data can be counted, filtered, and charted. Arrays become numbered columns, so scores [8, 9, 7] become scores[0], scores[1], and scores[2]. Nothing is sent anywhere; the JSON you paste stays in your browser.
How to use it
- Paste the API response: one object or a list of objects.
- Click Flatten and read the table.
- Check the column names: each dot-path is one nested field.
- Copy the CSV box into your spreadsheet.
- If records have different fields, empty cells mark the fields a record lacks.
Worked example
A research API returns {“user”:{“name”:”Ana”,”city”:”Madrid”},”scores”:[8,9,7]}. Flattened, that becomes one row with columns user.name = Ana, user.city = Madrid, scores[0] = 8, scores[1] = 9, and scores[2] = 7. A list of fifty such responses becomes a fifty-row table you can sort by city or average the scores from. Before flattening, the same data was a wall of braces that no spreadsheet could summarize. After flattening, ordinary tools — filters, pivot tables, charts — all work again.
Honest limits
Flattening loses structure. A list of authors inside a paper becomes separate columns, which is fine for counting but awkward if you later need the original grouping. Deeply nested or irregular records produce very wide tables with many empty cells. Very large responses will slow the page, and this tool does not page through API results or handle authentication — it works on JSON you already have, pasted in. Keep the original JSON file as your source of truth; the flat table is a working copy.
Who it is for
This tool is for researchers pulling data from open APIs, students learning how APIs structure data, and analysts preparing API exports for spreadsheets. It pairs naturally with the File Format Batch Converter: flatten here, then convert the flat CSV into whatever your next tool needs.
Going further
Wide flat tables have their own traps. When one record has twelve scores and another has three, the flat table carries nine empty cells for the second record, and an average computed across a row will silently ignore those empties while an average down a column like scores[9] rests on a handful of records. Decide before analysis whether arrays represent repeated measures of the same thing, in which case a long format with one row per measurement is usually better, or distinct fields that happen to be listed, in which case the wide flat table is right. If you need the long format, pivot the flattened columns in your spreadsheet or script — it is a mechanical step once the data is flat. Also keep identifiers: every flat row should carry the record id from the original JSON, so a suspicious row can be traced back to its source object in seconds. Flattening is reversible only if you kept the original, so archive the JSON response file, note the API endpoint and the date fetched, and treat the flat table as a derived product with its own version note. Name your flat columns carefully, because they become the vocabulary of every later analysis. Dot-paths like user.address.city are clear; auto-generated names like field_17 are not, and a collaborator who cannot guess what a column means will guess wrong. After flattening, rename the columns you actually use into plain language, keep a data dictionary that maps each flat column back to its JSON path, and drop columns that are empty for nearly every record before sharing the table. A flat table with forty well-named columns is a tool; the same table with four hundred cryptic ones is a puzzle nobody will finish.
Related tools
Versión en español · All free online tools.
Embed this tool on your website — free
Copy the code below to add this working tool to your own page. A small credit link stays with it — that’s all we ask.
