Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

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.

How to use JSON to CSV Flattener online

  1. Paste the JSON. An object or a list of objects.
  2. Choose the separator. And how to treat lists.
  3. Read the CSV. The flat table appears.
  4. 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?
Joined with a dot, such as user.name. You can change the joiner.
How are lists handled?
As numbered columns, or joined into one cell.
What if records have different keys?
The columns are the union of all keys, and missing cells are empty.
Why protect formulas?
A cell starting with = can run as a formula in a spreadsheet.
Can the columns be split by a semicolon?
Yes, or by a tab or bar.
Is the JSON to CSV Flattener private?
No. The JSON to CSV Flattener works in your browser, and nothing is uploaded.
Can I copy the JSON to CSV Flattener result?
Copy the JSON to CSV Flattener result, or save it as a text file from the result box.

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.

More tools in Text & Writing Tools →

Search tools