JSON to CSV Flattener
This tool flattens nested JSON into CSV. Nested keys become dotted column names such as user.name, and lists become numbered columns or one joined column.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use JSON to CSV Flattener online
- Paste the JSON. An object or a list of objects.
- Choose the separator. And how to treat lists.
- Read the CSV. The flat table appears.
- Copy it. Copy or save the CSV.
Why use this free JSON to CSV Flattener
- Dotted column names
- Lists as columns or joined
- Four separators
- Union of all keys
- Formula protection
- Share by link
The problem with nested data
A CSV file is flat: rows and columns. JSON can hold objects inside objects and lists inside lists. To turn it into CSV, the nesting has to be flattened. The tool joins the names of the nested keys with a dot, so {"user": {"name": "Ann"}} becomes a column called user.name.
Lists
A list of simple values can become one numbered column for each item, such as tags.0 and tags.1, or one column with the items joined by a semicolon. A list of objects is flattened by position in the same way, so orders.0.id is the id of the first order. Empty lists and objects give an empty cell.
A worked example
Two records have an id, a user object and a list of tags. The first has a name, a city and two tags, the second only a name and no tags. The result has 6 columns and 2 rows:\nid,user.name,user.city,tags.0,tags.1,tags 1,Ann,Oslo,a,b, 2,Bo,,,,\nCells that one record lacks are left empty.
Options
Choose the column separator (comma, semicolon, tab or bar), the joiner used in the column names, and how lists of simple values are handled. A protect option puts an apostrophe in front of cells that start with =, +, - or @, so that a spreadsheet does not run them as a formula.
Related tools
If your JSON is already flat, the JSON to CSV converter is simpler. To go back the other way, use the CSV to JSON converter. The tool takes a list of objects or a single object, and tells you if the shape is something else.
Using the tool
The JSON to CSV Flattener works again whenever the text or an option changes. Undo and redo step back through your earlier text.
JSON to CSV Flattener: frequently asked questions
How are nested keys named?
How are lists handled?
What if records have different keys?
Why protect formulas?
Can the columns be split by a semicolon?
Is the JSON to CSV Flattener private?
Can I copy the JSON to CSV Flattener result?
Related searches for JSON to CSV Flattener
- JSON to CSV Flattener online
- free JSON to CSV Flattener
- JSON to CSV Flattener online free
- JSON to CSV Flattener for mobile
- JSON to CSV Flattener without sign up
- convert json to csv flattener
- json to csv flattener converter
- JSON to CSV Flattener – Text & Writing Tools
JSON to CSV Flattener is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.