Pular para o conteúdo principal

JSON to Excel Spreadsheet

Convert the JSON to CSV, then bring it into Excel through Data → From Text/CSV and choose UTF-8: double-clicking the file makes older Excel assume ANSI and garble accented characters. Nested keys arrive as column paths like customer.name, columns are the union of all records, and the conversion runs entirely in your browser.

Só local
Só quer a ferramenta? Abra Converter JSON em CSVTransforma registros em planilha, mesmo aninhadosAbrir ferramenta

O guia abaixo está disponível apenas em inglês.

JSON to Excel Spreadsheet explained

API exports and database dumps are trees; Excel is a rectangle. Every JSON-to-CSV conversion has to decide what {"customer":{"name":"Ada"}} becomes, and the lazy answers — drop the object, paste [object Object] into the cell, stuff a JSON blob into one field — are the ones that waste an afternoon. Here nested objects flatten to explicit column paths (customer.name), array elements get their own columns (tags[0], tags[1]), and the column set is the union of every record, so a field that appears on only one row in fifty still arrives.

Getting the CSV into Excel is the half that actually breaks, and it breaks in three predictable ways: encoding (older Excel assumes ANSI when a file has no BOM, so é arrives as é), delimiters (in locales where the comma is the decimal separator, Excel expects semicolons and opens a comma file as one column), and import heuristics (product codes become dates, leading zeros vanish). None of these are defects in the CSV itself.

This page is the recipe for getting JSON data into a spreadsheet with none of those failures: the conversion decisions worth knowing, the paste path versus the import path, and the locale quirks that decide which delimiter to pick. The conversion runs in your browser — JSON exports are real records about real people, and they do not need a detour through a server.

The conversion itself happens in the JSON to CSV converter — paste the JSON, choose a delimiter, and copy or download the CSV.

If quotes and commas inside your data keep breaking rows apart, the guide to the CSV format explains the quoting rules every spreadsheet follows.

From nested JSON to a flat grid

Paste an array of records and each one flattens to leaf paths: {"customer":{"name":"Ada"}} produces a column named customer.name, and a tags array becomes tags[0], tags[1] and so on. The two notations are deliberately distinguishable — with dots alone, a.0 cannot say whether a was an array or an object with a key called 0 — which is what makes the round trip through CSV to JSON reversible.

Two further decisions matter in a spreadsheet. Arrays of scalars can be joined into one cell (priority, gift) instead of exploded into columns — easier to read, but lossy, so it applies only to scalars; an array of objects is always exploded, because joining it would destroy it. And null becomes an empty cell rather than the text null, which a spreadsheet would treat as a string. Quoting follows RFC 4180: fields are quoted only when they contain the delimiter, a quote or a newline, and quotes inside fields are doubled.

The UTF-8 BOM quirk in older Excel

A CSV downloaded from this tool is UTF-8 without a byte order mark — the modern default, and correct for every program that reads encodings properly. Older Excel (2016 and earlier in particular) does not: with no BOM present it assumes ANSI, a legacy Windows code page, and every character above 127 garbles — é becomes é, Curaçao becomes Curaçao, names and addresses turn to soup. The file is fine; the assumption is wrong.

The fix is the import path: Data → From Text/CSV (Data → From Text in older versions), choose the file, and set the encoding to 65001: Unicode (UTF-8) in the dialog. Modern Microsoft 365 builds usually detect UTF-8 unaided, but the dialog is the reliable route on any version — and the same dialog overrides the delimiter, which solves the next quirk in the same step. Pasting the raw CSV text into a sheet lands it in one column until Text to Columns splits it, so the import path is also the faster one for anything with more than a few fields.

Which delimiter to choose

Comma unless you have a reason — but reasons are common, because the delimiter and the locale are entangled. In much of Europe and South America the comma is the decimal separator, and Excel there lists the semicolon as its list separator: a comma-delimited file opens as one giant column, while a semicolon file opens cleanly. The decision table:

Your destinationChooseWhy
Excel in a comma-locale (UK, US)CommaMatches Excel's list separator; opens on double-click
Excel in a semicolon-locale (much of Europe)SemicolonThe comma is busy being the decimal separator
Fields full of commas and quotesTabTabs almost never appear inside data, so quoting is rare
A system that documents pipe-delimited inputPipeMatch whatever consumes the file next

Excel's import heuristics: dates, zeros and long numbers

Even a perfectly formed CSV can be mangled by Excel after it opens — by the importer, not the file. Values that resemble dates (2-2024, 3/4) are converted into real dates; product codes and postcodes with leading zeros lose them (007 becomes 7); long numeric IDs switch to scientific notation and their trailing digits are gone for good. On double-click these reinterpretations are one-way.

The defence is the same dialog: Data → From Text/CSV lets you set columns to Text before anything is imported, so each value arrives as written. For pasted data, format the destination column as Text first. It is worth insisting on because the damage is silent — a postcode column of numbers looks correct until someone notices the missing leading zeros, and by then the original CSV is long gone.

Practical limits, stated plainly

The converter parses JSON strictly, so a trailing comma or a smart quote is reported with a line and column rather than silently tolerated. Input is capped at 8 MB because the conversion runs on the main thread — past that it declines rather than freezing the tab. And CSV itself has hard edges no converter can remove: a cell cannot distinguish the string 22201 from the number 22201, or an empty cell from an absent field, so the round-trip page documents those two caveats instead of promising losslessness.

Frequently asked questions

Is my JSON uploaded when I convert it to CSV?

No. The conversion is a function call inside your browser tab — there is no API route to send the document to. Verify it: open DevTools, watch the Network panel, paste a document, and no request carries it. The page's Content-Security-Policy sets connect-src 'self', so the browser would refuse an outbound upload anyway. JSON exports are real records, which is exactly why the conversion stays local.

Why do accented characters look wrong when I open the CSV in Excel?

Older Excel assumes ANSI when a CSV has no BOM, and this tool's output is UTF-8 without one — the correct modern default. Import through Data → From Text/CSV with the encoding set to 65001: Unicode (UTF-8) and the accents survive. Microsoft 365 builds usually detect UTF-8 on their own.

How do nested objects and arrays become columns?

Objects flatten to dotted paths — customer.name — and arrays to bracketed ones — tags[0], tags[1]. The column set is the union across every record in first-seen order, so optional fields get a column with empty cells elsewhere instead of being dropped. Explode mode round-trips; join mode packs scalar arrays into one cell and is lossy by design.

Why does my CSV open as one single column?

The delimiter does not match what your Excel expects — usually a comma file in a semicolon locale, where the comma is the decimal separator. Import through Data → From Text/CSV and pick the delimiter in the dialog, or go back and choose semicolon (or tab) in the converter. The file is not broken; the guess was.

Why did my product codes turn into dates or lose their leading zeros?

Excel's import heuristics, not the file: anything date-shaped becomes a date, leading zeros are stripped from anything number-shaped, and long IDs go scientific. Use Data → From Text/CSV and set those columns to Text before the import, or format the destination column as Text when pasting.

Can I turn the CSV back into JSON?

Yes — the CSV to JSON tool rebuilds the nesting from the same column paths, so the round trip returns the document you started with. Two caveats are CSV's own: a cell cannot distinguish a string from a number, or an empty cell from an absent field, so those two distinctions exist only in the original JSON.