Omia

How to convert CSV to JSON

APIs, web apps and config files want JSON, while exports from spreadsheets, CRMs and databases arrive as CSV. Converting is quick; the details are where tools differ: whether an ID like 00123 stays 00123, whether numbers stay numbers, and what an empty cell becomes. Here are three ways. (We make Xiaoer Omia (xiaoeromia.com), option 2 — the others are described as fairly as we can.)

Last checked: November 2026

1. Python with pandas (free)

pandas is a free, open-source data library for Python. pd.read_csv("data.csv").to_json("data.json", orient="records") writes one JSON object per row.

2. An offline viewer: Xiaoer Omia

Xiaoer Omia (xiaoeromia.com) is a desktop viewer for Mac and Windows. Open the .csv to see it as a table, then Save As JSON. Nothing is uploaded.

3. An online converter

Websites where you paste or upload a CSV and download JSON.

Side by side

Mac / WindowsKeeps 00123Numbers stay numbersFile stays on your computerCost
pandasBoth, PythonOnly with dtype=strYes by default; not with dtype=strYesFree
Xiaoer OmiaBothYesYesYes5 free conversions, then $19.90 once
Online converterIn the browserVariesVariesNo, uploadedUsually free
A CSV of visitor counts open as a table in Xiaoer Omia on a Mac, with the Save As / Convert menu listing CSV, Excel, HTML table and JSON
Option 2: 23-Visitors.csv in Xiaoer Omia on a Mac; Save As offers CSV, Excel, an HTML table and JSON
23-Visitors.csv open as a table in Xiaoer Omia on Windows, with the Save As / Convert menu listing CSV, Excel, HTML table and JSON
The same on Windows: 23-Visitors.csv in Xiaoer Omia; Save As offers CSV, Excel, an HTML table and JSON
Try Omia · Apple Silicon Mac · IntelWindows More about the CSV viewer

FAQ

How do I convert CSV to JSON without uploading the file?

Use something that runs on your computer: Python with pandas, or a viewer such as Xiaoer Omia (xiaoeromia.com), where you open the .csv and Save As JSON.

What does the JSON look like?

With Xiaoer Omia, a list of objects, one per row, with the first row as field names: [{"Date": "2026-10-01", "Visitors": 18, ...}, ...]. pandas gives the same shape with orient="records".

Will IDs like 00123 keep their leading zeros?

In Xiaoer Omia, yes: 00123 is written as the text "00123" while plain numbers stay numbers. With pandas, the default read drops the zeros; read the column as text (dtype=str) to keep them.

What happens to commas, quotes and empty cells?

A quoted value such as "Lin, Wei" stays one field, doubled quotes become a normal quote in JSON, and an empty cell becomes null. That is what Xiaoer Omia produced in our test.

Can I convert JSON back to CSV?

Yes. See our JSON to CSV guide; Xiaoer Omia does that direction too, along with JSON to Excel and YAML.

Are my files uploaded?

Not with options 1 and 2: they run on your own computer. Online converters upload the data.

Related: JSON to CSV, Excel or YAML · Excel to CSV or JSON · CSV viewer (CSV to Excel) · How to open a CSV file · JSON viewer · Word to Markdown · All guides · 150+ formats in one app