Pulse Data Hub

Tools / CSV to JSON

CSV to JSON Converter

Convert CSV to JSON, or JSON back to CSV, with a preview of the table. Paste your data or open a file.

Free, no sign-up. Everything runs in your browser, so your data is never uploaded.

How to use the converter

  1. Paste CSV into the box, or choose Open a CSV file. The delimiter (comma, semicolon, tab or pipe) is detected automatically.
  2. Choose the JSON shape you need. Array of objects is the most common: one object per row, with the header names as keys.
  3. Click Convert to JSON, check the preview table, then copy or download the result.

To go the other way, switch to JSON to CSV. It accepts an array of objects or an array of arrays. Columns are collected from every object, so rows with missing keys still line up.

What the options do

  • Convert numbers and true/false turns 34 into the number 34 and true into a boolean. Values with leading zeros, such as ZIP codes like 02134, stay as text so they aren’t damaged.
  • Empty cells as null writes null instead of an empty string, which is what most databases and APIs expect for missing values.
  • Object of columns gives {"name": [...], "age": [...]}, the layout pd.DataFrame(data) and many charting libraries read directly.
  • Flatten nested objects turns {"address": {"city": "Leeds"}} into a column called address.city. Lists are written as JSON text.

Quoted fields are handled properly, including commas, quotes ("") and line breaks inside quotes.

Do the same in Python

If you convert files regularly, two lines of pandas do the same job:

import pandas as pd

df = pd.read_csv("data.csv")
df.to_json("data.json", orient="records", indent=2)   # array of objects

Use orient="list" for an object of columns, and pd.read_json("data.json") to go back. Our pandas data manipulation tutorial covers reading and writing files in more detail.

FAQ

Is my data uploaded anywhere?

No. The conversion runs in JavaScript in your browser. Nothing is sent to our server, so it’s safe for private data.

How big a file can it handle?

Files of a few megabytes, tens of thousands of rows, convert in a second or two. Very large files depend on your computer’s memory; for those, pandas is the better tool.

Why are some numbers still in quotes?

Values with leading zeros, like 007, are kept as text on purpose, because converting them would lose the zeros. Untick Convert numbers to keep every value as text.

My CSV uses semicolons. Will it work?

Yes. Semicolons are common in European exports from Excel, and the converter detects them. You can also pick the delimiter yourself.

Related

Verified by MonsterInsights