paste in · excel-ready csv out

JSON to CSV for Excel — opens clean first time

A CSV that opens cleanly in Excel needs the right delimiter and the right encoding. You pick both here, and there is code at the bottom if you would rather build the file yourself.

Converter — Ready
Awaiting input
idle — paste JSON and the rows show up here
0 rows 0 columns Tab delimiter
runs entirely in your browser
nothing is uploaded, ever
no sign-up, no account
free — no paid tier, ever
Do it in code

Writing the file from Python

Two options: a CSV that Excel opens by double-clicking, or a real .xlsx workbook with the column types already set. The second one is more work but it stops Excel from rewriting your values behind your back.

import csv
import json

with open("data.json", encoding="utf-8") as f:
    rows = json.load(f)

# utf-8-sig writes the BOM that makes Excel read UTF-8 correctly on Windows.
fieldnames = list(dict.fromkeys(k for row in rows for k in row))

with open("data.csv", "w", newline="", encoding="utf-8-sig") as f:
    writer = csv.DictWriter(f, fieldnames=fieldnames, restval="")
    writer.writeheader()
    writer.writerows(rows)

Option 1 - a CSV that Excel opens cleanly (UTF-8 with a BOM)

import json

from openpyxl import Workbook
from openpyxl.styles import Font

with open("data.json", encoding="utf-8") as f:
    rows = json.load(f)

wb = Workbook()
ws = wb.active
ws.title = "data"

headers = list(dict.fromkeys(k for row in rows for k in row))
ws.append(headers)
for cell in ws[1]:
    cell.font = Font(bold=True)

for row in rows:
    ws.append([row.get(h, "") for h in headers])

# Keep identifiers like "007" and long account numbers as text.
for row in ws.iter_rows(min_row=2, min_col=1):
    for cell in row:
        if isinstance(cell.value, str) and cell.value.isdigit():
            cell.number_format = "@"

wb.save("data.xlsx")

Option 2 - a real .xlsx workbook with the column types set

The utf-8-sig encoding in option 1 is the whole trick for Excel on Windows: it writes the three-byte byte order mark that tells Excel the file is UTF-8 instead of the local code page. Without it, a name like "Zoë" arrives as "Zoë".

Option 2 is worth the extra dependency when the file has to be handed to someone who will edit it - the number formats are set once, so nobody has to fix the columns by hand.

Worked example

A worked example

A JSON payload with a character Excel gets wrong, and a column Excel would rewrite.

customers.json

[
  { "name": "Zoë Müller", "postcode": "01234", "id": 1000000000000001 }
]

customers.csv

name,postcode,id
Zoë Müller,01234,1000000000000001

The converter above defaults to a tab delimiter so the file pastes straight into Excel - switch it to comma in the settings to match this example. Written as plain UTF-8, Excel on Windows shows "Zoë Müller". The file above is written as utf-8-sig, so it shows "Zoë Müller". The second problem - Excel turning 01234 into the number 1234 and 1000000000000001 into scientific notation - is a display setting on import, which the guide below explains.

Step by step

Get a CSV that opens cleanly

Three settings, in the order that matters.

  1. Paste the JSON

    The converter above parses it in your browser and shows the table immediately.

  2. Choose the delimiter

    Tab is the default because it pastes into Excel cleanly. Switch to comma for a file other programs will read.

  3. Download and open

    Double-clicking the file opens it in Excel with the columns where you expect them.

  4. Fix the columns Excel rewrote

    If a postcode or an account number came out as a number, import the file with Data > From Text and set that column to Text.

Why HopConvert

The Excel details that catch people out

Three settings decide whether the file opens cleanly or wastes an afternoon.

Encoding is right

The download is UTF-8, so accented characters and emoji survive the round trip on every platform.

Delimiters are explicit

Tab or comma, chosen by you rather than guessed from the data, so a value containing a comma cannot break the row.

Column order is preserved

The header order follows the JSON, so the sheet matches the API response instead of being re-sorted by the browser.

Straight to a real workbook

If you want a .xlsx rather than a CSV, the JSON to Excel converter produces a genuine workbook in your browser.

The complete guide

The full JSON to CSV guide

Delimiters, quoting, encoding and the spreadsheet edge cases, explained properly.

Read the JSON to CSV guide

Related tools: JSON to Excel converter · JSON to CSV in Python · CSV to JSON converter · JSON to Markdown

FAQ

Frequently asked questions

Encoding, delimiters and the columns Excel keeps rewriting.

How do I open the CSV in Excel?
Double-click it, or drag it onto Excel. If the columns all land in one cell, the delimiter is wrong - set it to comma when importing. For full control use Data > From Text/CSV and pick the delimiter and column types there.
Why do my accented characters look wrong in Excel?
Excel on Windows reads a plain UTF-8 CSV as if it were in the local code page. Writing the file as utf-8-sig adds a byte order mark that tells Excel the file is UTF-8. The Python snippet above uses that encoding.
How do I stop Excel from reformatting my IDs?
Import the file with Data > From Text/CSV and set that column to Text before loading. Excel decides a column of digits is a number, then rounds it, drops leading zeros and can show it in scientific notation. Nothing in the CSV file can stop it - the setting lives in the import.
Should I use tabs or commas?
Comma is the standard for a .csv file and what other programs expect. Tab is safer for a file a person will double-click in Excel, because it removes the whole class of problems where a value contains a comma. Both are available in the converter above.
Can I get a real .xlsx file?
Yes. The JSON to Excel converter builds a genuine workbook in your browser, with a header row and one sheet per array. The option 2 snippet above does the same from Python with openpyxl.

Get an Excel-ready CSV

Free, instant, and private — your JSON never leaves this tab.

Convert for Excel Read the FAQ