CSV to JSON Converter

Global tools

The direction most import scripts begin with, and the one where a converter proves itself. A CSV file is a table written as text, but the text has rules: fields quoted because they contain a comma, quotes doubled inside quotes, line breaks that belong to a cell rather than ending a row, semicolons where the decimal comma is used, and rows that simply have the wrong number of columns. Each of those is a place a naive converter guesses, and a guess is how a thousand-row import silently gains an empty column.

CSV in the loose sense: fields separated by the delimiter below, with quoted fields, doubled quotes and line breaks inside a field read the way RFC 4180 specifies.

Semicolons are the convention where the decimal comma is used - a CSV full of 1,5 values is not a CSV full of commas. "Detect it in the text" looks for whichever character appears the same number of times on every line.

With a header, each row becomes an object; without one, each row becomes an array.

Detection leaves anything with a leading zero and anything longer than fifteen digits as text, because both would be wrong as a number.

Leave it blank for "data.json".

Results update as you type. Nothing leaves your device.

Read 3 rows

3 columns

The table was read following RFC 4180 and written out as JSON, one object per row.

Rows
3
Columns
3
Ragged rows
0
Size
242 B

JSON

[
  {
    "name": "Ada Lovelace",
    "role": "Editor",
    "since": "2024"
  },
  {
    "name": "Grace Hopper",
    "role": "Reviewer",
    "since": "2025"
  },
  {
    "name": "Alan Turing",
    "role": "Advisor",
    "since": "2025"
  }
]

Copy it, or download it as a file. One object per row, with the column names as keys.

What the numbers do not say

  • Every cell came out as text, which is the safe default: a spreadsheet column of phone numbers, postcodes or account numbers is full of values that look like numbers and are not.
  • The first row was read as column names, and the separator was set to comma (. Quoted fields, doubled quotes and line breaks inside a field are all read the way the format specifies.
The table was read and the JSON written in this browser tab: nothing was uploaded and nothing was sent anywhere.

This page reads the table the RFC 4180 way and writes an array of objects, one per row, with the header as keys - or an array of arrays when there is no header, which is a real need rather than a quirk. It will not reshape silently: padded rows, trimmed rows and cells that were protected from becoming numbers are all counted and reported, because a converter that reports its own choices is the one you can trust with a customer list.

About this csv to json converter

This page is the read half of the same pair as the JSON to CSV converter, and it stops where reading does: it takes a table and a few choices, and hands back JSON. There is no reformatting of the text, no round trip, and no place where your data is sent - the parse and the write happen in the tab, and the only file that leaves the computer is the one you download on purpose.

If you came for the other direction, the JSON to CSV page is one click away and turns an array of objects back into a table with the same quoting rules, so a round trip between the two forms keeps its meaning. If you only needed one field pulled out of every row, the JSON formatter is lighter for that.

How this csv to json converter works

How a table is read, and what breaks a naive split

The reader treats the text as fields separated by a delimiter and records separated by line breaks, and a field may be wrapped in double quotes. Inside quotes, a doubled quote means one quote, the delimiter is just a character, and a line break ends the field rather than the row - which is why a two-line note is one cell and a reader that splits on newlines first will tear the file in half.

The delimiter is a setting because it is not always a comma: countries where the decimal separator is a comma use a semicolon, and Excel hands out tab-separated text. The detection option looks for whichever separator appears the same number of times on every one of the first rows, which is the signature of a real table rather than a coincidence, and the results panel says which separator was chosen.

Two more things arrive before the data does. A byte order mark that Excel writes at the front of a “CSV UTF-8” export is removed, because otherwise it silently becomes part of the first column name. And a cell that begins with an equals sign, a plus, a minus or an at sign can be executed by a spreadsheet as a formula - CSV injection - so cells like those are kept as plain text and the count is reported.

Headers, ragged rows and the numbers that must not become numbers

With a header row the first line becomes the object keys and each following row becomes one object; without one, each row becomes an array and you read the result by position. Rows that do not match the header do not disappear: a short row is padded with empty cells and a long one is trimmed so the table stays rectangular, and the count and the first few row numbers are reported, because a row that lost a field is exactly what you want to know about before importing anything.

By default every cell comes out as text, and that is the safe setting: a column of phone numbers, postcodes, account numbers or version strings is full of values that look like numbers and are not, and turning them into numbers would quietly corrupt them. Type detection is available, and even then two exceptions stay as text - anything with a leading zero and anything longer than fifteen digits, which cannot survive as a double.

What the table cannot tell the converter, and what that costs

The format carries no types, so a date, a version string and a postcode all arrive as text and leave as text unless detection is switched on - and even then the page keeps anything with a leading zero or more than fifteen digits exactly as typed. An empty cell is the sharper case: with detection off it comes out as an empty string, with detection on it comes out as null, and the file never says which one you meant, so a round trip cannot restore a distinction that was never written down.

Two columns with the same header name are the other silent trap: the later column takes the key and the earlier values disappear, so a header row that is not unique loses data without an error. A header cell is also clipped at 120 characters, because it becomes a JSON key, and an unnamed column gets a positional name like column_3. Trailing spaces stay part of the value - the format does not trim them - so a column that looks numeric can arrive with a space on the end and stay text.

Worked examples

Each example below was run through the calculator on this page when the site was built, so the numbers match what you see when you enter the same inputs.

A spreadsheet export, back into data

Paste the table here: name,role,since Ada Lovelace,Editor,2024 Grace Hopper,Reviewer,2025 Alan Turing,Advisor,2025 · Column separator: Comma (,), the usual choice · Header row: Yes - first row is column names · Cell values: Detect numbers and booleans

Read 3 rows

3 columns

The table was read following RFC 4180 and written out as JSON, one object per row.

Rows: 3 · Columns: 3 · Ragged rows: 0 · Size: 236 B

Three rows become three objects, and because detection was on, the year column is an integer rather than a string.

A semicolon file with no header row

Paste the table here: Paris;48.86 London;51.51 Berlin;52.52 · Column separator: Semicolon (;), used where the decimal comma is · Header row: No - the result is an array of arrays · Cell values: Keep every cell as text

Read 3 rows

2 columns

The table was read following RFC 4180 and written out as JSON, one object per row.

Rows: 3 · Columns: 2 · Ragged rows: 0 · Size: 107 B

With no header the result is an array of arrays, and each row keeps its position rather than inventing keys.

Frequently asked questions

Is my CSV uploaded anywhere?

No. The text is parsed and written by JavaScript in this tab, the results panel is built from what is already on the page, and the download is a blob created locally. An import is often customer records or an API response, so nothing here touches a server at all.

Why do my numbers come out as text?

Because that is the safe default. A spreadsheet column of phone numbers, postcodes, account numbers and version strings is full of things that look like numbers and are not, and detecting them would turn “01234” into 1234 and round a 16-digit ID. Turn type detection on and plain integers, decimals and true/false become proper JSON types, while leading zeros and anything past fifteen digits stay text.

My file uses semicolons, not commas. Does that work?

Yes, and the automatic option usually finds it: detection picks the character that appears the same number of times on every row, which is what separates a table from prose. When in doubt, set the separator explicitly - a semicolon file opened as commas turns every row into one cell, and the results panel always names the separator that was used.

What happens to a row with missing or extra cells?

It is padded (if short) or trimmed (if long) so the table stays rectangular, and it is reported with its row number rather than fixed silently. Imports arriving from hand-edited or versioned files hit this often, and the honest thing is to say it happened.

Why is a cell starting with = or + left as text?

Because a spreadsheet executes a cell it is handed. Leading =, +, - and @ are how a formula begins, so cells like that are kept as plain data and the count is reported - the standard defense against CSV injection, also called formula injection.

Assumptions and sources

  • CSV follows RFC 4180: fields separated by commas, records ending in CRLF, and quotes around any field holding a comma, a quote or a line break.
  • Cells starting with `=`, `+`, `-` or `@` stay text so a spreadsheet cannot run them, and a leading zero is never turned into a number.
  • Tables are handled in your browser only: nothing is uploaded, and the JSON goes to a local download.

Last reviewed 2026-10-07. Runs locally on your device; keep backups; no financial advice applies. Read the full disclaimer.

Where a figure on this page comes from an official agency — HUD, IRS, FICO or a state body — the site keeps a dated snapshot of the source page in its sources library, and a scheduled job re-checks that snapshot, so the number can be traced back to the document it came from.