Excel to JSON
How to convert Excel to JSON for free
rows.page turns pasted Excel cells, or a CSV of up to 1.5 GB, into JSON in your browser, free with no signup; DuckDB 1.2 or later and pandas convert .xlsx files directly in a script. Excel's Save As menu has no JSON option, and rows.page does not open .xlsx files.
No file handy? Open CO2 emissions by country and year (50k rows, 14 MB).
Ways to convert Excel to JSON
rows.page reads the tab-separated text Excel puts on the clipboard and CSV files saved from Excel. It never opens the workbook itself, so to read .xlsx files directly you use DuckDB's excel extension or pandas.
| Method | Good for | Reads .xlsx directly | Cost |
|---|---|---|---|
| rows.page, Paste data | A copied range you want to check before export | No, reads the pasted cells | Free, no signup |
| rows.page, CSV file | A whole sheet up to 1.5 GB, with filters or SQL before export | No, save the sheet as CSV first | Free, no signup |
DuckDB excel extension | Scripts and SQL pipelines | Yes, .xlsx only (no .xls) | Free, open source |
| pandas with openpyxl | Python scripts and notebooks | Yes | Free, open source |
Paste Excel cells into rows.page and export JSON
For a range of cells you don't need a new file at all. rows.page reads the paste inside your browser with DuckDB-WASM, and nothing is uploaded unless you press Share.
- Select the cells in Excel, header row included, and copy them.
- Open rows.page, click Paste data and paste. The cells arrive tab-separated and open as a table, with the header row detected.
- Optional: filter with
price:>20orcountry:NL, sort or hide columns, or run SQL against thedatatable. - Open the Export menu and pick JSON for one array of objects keyed by the header row, or JSONL for one object per line.
Export writes the current view, so filters, sort order and hidden columns all apply, and a SQL result exports up to 1,000,000 rows. Numeric columns stay JSON numbers and empty cells become null. To grab a single record, open its row and use Copy as JSON.
Convert a whole sheet to JSON through CSV
rows.page can't read a workbook. Dropping an .xlsx file on the page won't show your sheet, and pushing one with curl -T returns "This looks like an Excel or zip file. Export it as CSV and push again." Save the sheet as CSV instead:
- In Excel, choose File > Save As, set the file type to CSV UTF-8 (Comma delimited) and save. Excel saves only the active sheet.
- Drop the
.csvfile on rows.page or choose it from your disk. - Check the column types in the Columns panel, then export JSON or JSONL.
rows.page opens CSV files up to 1.5 GB per browser tab, and a bigger file loads partially with the note "Loaded the first N rows: the file is X, more than the browser can hold." The CSV sniffer detects comma, semicolon, tab and pipe delimiters, so a semicolon-separated export opens without changes.
Pick CSV UTF-8 over plain CSV (Comma delimited). A file that isn't valid UTF-8 is read as Latin-1 with the note "Read as Latin-1 text.", and one saved as Windows-1252 with a euro sign, curly quotes or long dashes won't open at all ("Couldn't open this data").
Convert .xlsx to JSON with DuckDB or pandas
For many workbooks, or to skip the CSV step, read the .xlsx file directly in a script.
DuckDB
DuckDB 1.2 and later reads and writes .xlsx files with the excel extension; old .xls files are not supported. This reads Sheet1 and writes a JSON array:
INSTALL excel;
LOAD excel;
COPY (SELECT * FROM read_xlsx('book.xlsx', sheet = 'Sheet1')) TO 'out.json' (FORMAT json, ARRAY true);Leave out sheet to read the first sheet, and leave out ARRAY true to get JSONL. Number cells load as DOUBLE, so an ID of 1 is written as 1.0; select CAST(id AS BIGINT) AS id to keep whole numbers. Text cells keep their leading zeros, and date cells become ISO dates such as 2019-04-01.
pandas
pandas reads .xlsx files through openpyxl (pip install pandas openpyxl). orient='records' gives an array of objects keyed by the column names, and date_format='iso' writes ISO 8601 timestamps instead of the default epoch milliseconds such as 1554076800000:
import pandas as pd
df = pd.read_excel('book.xlsx')
df.to_json('out.json', orient='records', date_format='iso')read_excel turns digit-only text such as 02134 into the number 2134, even when the cell is stored as Text in Excel. Pass dtype={'zip': str} for ZIP codes and IDs to keep the zeros.
Excel gotchas to check before you export
Whether you paste cells or save a CSV, check these five things before exporting JSON:
- Displayed values: copying takes what the cell shows, not the stored number. A cell holding
1234.5678formatted as currency pastes as the text$1,234.57, so clear number formats first if you need exact numbers. - Dates: copied dates arrive in your display format. A date column shows min and max dates in the Columns panel; if yours stayed text, convert it with
strptime()in SQL. - Leading zeros: Excel drops them from cells stored as numbers, which breaks ZIP codes and IDs. If they still show in Excel (a Text column or a custom format like
00000), they survive the copy and rows.page keeps02134as text. If they are gone, pad them back withSELECT lpad(CAST(zip AS VARCHAR), 5, '0') AS zip, * EXCLUDE (zip, __rid) FROM data. - One sheet at a time: a clipboard copy, a CSV Save As and each
read_xlsxcall all cover a single sheet. - Merged cells: a merged range keeps its value only in the top-left cell, so the other rows come out empty or
null. Unmerge and fill the values down before you copy.
rows.page limits and prices
| What | Limit or price |
|---|---|
| Open a file in your browser | Files up to 1.5 GB, $0, no account, nothing uploaded |
| Share a link without an account | $0, files up to 100 MB, link deleted 7 days after creation |
| Free account | $0, 10 datasets kept, last 3 versions |
| Pro | $12/month, 100 datasets, files up to 500 MB, private links |
| Max | $39/month, 1,000 datasets, files up to 2 GB, private links |
Questions
Can rows.page open .xlsx or .xls files directly?
No. rows.page reads CSV, TSV, JSON, JSONL and Parquet files, plus cells pasted from Excel. Save the sheet as CSV UTF-8 or paste the cells, or read the workbook with DuckDB or pandas in a script.
Is my Excel data uploaded when I convert it on rows.page?
No. Pasted cells and opened files are read inside your browser by DuckDB-WASM. Nothing leaves your computer unless you press Share ("Upload and get a link"), which hosts the file at a link.
What is the difference between JSON and JSONL on the Export menu?
JSON writes one array ([...]) with an object per row, keyed by your column headers. JSONL, also called NDJSON, writes one object per line with no surrounding array, which is easier to stream line by line in scripts.
What happens if a column in my sheet already contains JSON text?
If 90% or more of a column's values in the first 1,000 rows are JSON objects, rows.page expands it into dot-path columns such as user.address.city, up to 8 levels deep and 200 child fields per object. Arrays stay as list columns.
Can I clean the data with SQL before exporting to JSON?
Yes. Type a query that starts with SELECT, WITH or FROM into the filter box; the table is called data. You can rename or cast columns, or de-duplicate with SELECT DISTINCT * EXCLUDE (__rid) FROM data, then export up to 1,000,000 rows of the result.