Table Tools

JSON to CSV / Excel Converter

Paste a JSON array, a single object, or NDJSON, and download CSV, TSV, or Excel. Large identifiers are protected, and nothing is uploaded.

Converter

Drop a JSON or NDJSON file here, or .

How to turn an API-style JSON document into a spreadsheet

JSON is how most web APIs describe records. Spreadsheets are how most humans sort, filter, and send those records to someone else. The translation looks obvious until you hit a nested object, a number that is really an identifier, or a document that is not a tidy array of objects. This page does the translation in your browser. Nothing is uploaded.

  1. Paste the JSON or drop a .json file. Pretty-printed or compact input is fine. A UTF-8 BOM, if present, is ignored.
  2. Check the preview. Column names come from object keys. A string such as London, UK should occupy one cell, not two, and a long ID should still show every digit.
  3. Download CSV, TSV, or Excel. If a person will open the CSV in Excel, leave “Excel-safe long numbers” on so identifiers are not rounded. If you want a workbook from the start, use the Excel download.

Use the button to try a three-row array that includes the 18-digit ID 123456789012345678, the city London, UK, and the name 张伟.

Shapes this tool accepts

The most common input is an array of objects: [{ "customer": "Ada", "city": "London" }, …]. Each key becomes a column. If later rows introduce new keys, those columns are added; earlier rows get a blank cell. That is the least surprising way to represent a list of records that were not all minted from the same schema.

An array of arrays is treated as rows already. Use this when the JSON was exported from a grid and the first inner array may already be a header.

A single object is written as two columns, key and value. That is useful for a configuration blob or a one-record payload, and it is honest: inventing a one-row table by treating keys as headers would throw away the fact that you had a dictionary, not a list.

If a strict JSON.parse fails, the tool tries NDJSON (JSON Lines): one object per line, the format many log pipelines and jq exports use. Each line must be valid JSON on its own. If some lines are commentary or a pretty-printed object split across lines, that attempt will fail and you will see the original parse error.

A JSON array of primitives, such as a list of strings, becomes a one-column table headed value.

Nested values and why this page does not auto-flatten them

When a field is itself an object or an array, the cell is filled with the compact JSON for that value, for example {"lat":31.2,"lng":121.5} or ["red","blue"]. A converter that auto-flattens into address.city and address.street looks helpful until two records nest differently, or an array of tags becomes tags.0, tags.1, and a ragged set of columns. You can always flatten the document in your own script first, then paste the result here. Leaving nested values intact means you can also rebuild them later with the CSV to JSON converter without guessing.

null becomes an empty cell. Booleans become true and false. Those are reversible enough for a spreadsheet and will not be confused with the text of a name.

The large-integer trap in JSON

JSON numbers have no size limit in the specification, but the parser in your browser is JavaScript, and JavaScript numbers are IEEE floats with a safe integer range up to 253 − 1 (about 16 digits). An unquoted value such as 123456789012345678 in a JSON file has already been rounded by the time a normal JSON.parse returns. The original last digits are gone, and no converter can invent them back.

Two defences are built in. First, before parsing, this tool rewrites integer literals of 16 or more digits into JSON strings, so a file that was written with raw oversized numbers still yields the original digits in the preview. Second, if your API already emits IDs as strings, which is the practice you want, those strings pass through unchanged, including leading zeros such as "00123". When you download Excel, those values are stored as text cells. When you download CSV, the Excel-safe option writes them as ="…" so a later double-click in Excel does not undo the work.

If you control the API, prefer strings for identifiers. If you do not, at least inspect the preview before you trust a download that came from a raw 18-digit number.

What this page does not do

It does not fetch a URL for you. Browsers will not let a website read an arbitrary API with your cookies. Paste the payload, or drop a file you already saved. For a table that is already rendered on a web page, the Table to Excel & CSV Chrome extension is the better starting point.

Frequently asked questions

Is my JSON uploaded?

No. Parsing and file generation run locally in your browser.

Does pretty-printed input matter?

No. Whitespace is ignored, as in any standard JSON parser.

Will commas inside a string break the CSV?

No. Fields that contain commas, quotes, or newlines are quoted in the CSV, with interior quotes doubled.

Can I get an Excel file instead of CSV?

Yes. The Excel download is a standard .xlsx workbook and is the more reliable way to give the data to someone who will open it in Microsoft Excel, Apple Numbers, or Google Sheets.

What about Chinese text?

JSON is Unicode. CSV downloads include a UTF-8 BOM so Excel on Windows is more likely to keep 张伟 readable. The Excel download stores Unicode directly.

Is this affiliated with Microsoft Excel?

No. “Excel” refers to the common .xlsx format. This is an independent tool.