Free, no signup. Change the text in any PDF.Edit a PDF
CSV → JSON Converter

Convert CSV to JSON - Rows Become Records, Headers Become Keys

Upload a CSV file and get a JSON list of records, one per row, named after your header line.

Select your file to convert

or drop your file here

Expert Tips

What the pros know

Pro Tip

Clean the header line before you convert, because it becomes the key names in your JSON. Trailing spaces are trimmed for you, but a blank heading turns into column_3 and a repeated one into Age_2, which you'd then have to rename in code.

Common Mistake

Expecting true and false, or numbers, to come out as JSON booleans and numbers. Every value is a string, so "active": "true" is text. Compare against the string, or convert the field after loading the file.

Best For

Someone with a spreadsheet export or a database dump in CSV who needs to load it into an app or a script.

Not Recommended

A CSV with more than 5,000,000 cells, such as 100 columns by 50,001 rows. The converter refuses it, so split the file into smaller ones first.

FAQ

Frequently Asked Questions

Upload the file in the box at the top of this page, keep JSON as the output, and download the result. Each row becomes a record, and the header line gives the key names.

A CSV doesn't store types, so the converter keeps every value as text rather than guessing. That is what keeps leading zeros and decimals as written. Convert the columns you know are numeric in your code, or save the data as .xlsx and use XLSX to JSON, where numbers stay numbers.

Yes. Comma, semicolon, tab and | are all detected from the header line, and an Excel sep=; line at the top is read and then dropped. If two separators tie, the comma wins.

Yes, if it's in double quotes, which is how Excel and Google Sheets save such values. "Silva, Ana" comes out as Silva, Ana, and a quote written twice inside quotes becomes one quote.

The first line that isn't blank is always used as the header, so without one, your first row of data would become the key names. Add a header line in a text editor before you upload.

One known cause is a file saved as UTF-16 without a byte order mark, which the converter can't detect yet. UTF-8, UTF-16 with a BOM and Windows code pages such as Windows-1252 are read correctly. Save the file as UTF-8 and upload it again.

20 MB per file, and up to 5 files at once. There's no separate row limit; a file is refused only if it has more than 5,000,000 cells or 16,384 columns.

Convert CSV to JSON online free

Turn a spreadsheet export into JSON a program can read

Spreadsheets save tables as CSV, but a web app, an API or a script wants a list of records it can loop over. Converting CSV to JSON gets you there. Each row of the table becomes one record, each column heading becomes a key, and the result is a JSON file that JavaScript, Python and most other languages read in one line of code.

What makes a CSV awkward is that it carries no types. A value is just the characters between two commas, so a reader has to decide whether 01100 is a ZIP code or the number 1100. Our converter doesn't decide for you. It keeps every value exactly as written, and this page explains that choice, how the separator and header line are read, and what it does with quotes, empty cells and files that aren't UTF-8.

How to convert CSV to JSON

  1. Upload your CSV file - Drop it into the box at the top of this page, or click to browse. Up to 5 files can go in at once.
  2. Check the output - JSON is already picked on this page, so there's nothing to set.
  3. Download your file - Save the .json file when it's ready. It opens in any text editor, and in our file viewer.

The conversion happens on our servers, not in your browser, so there's nothing to install and no account to make. Our security page explains what happens to your file after that. The download link works for 30 minutes.

How rows and columns become JSON

The output is a list of records, one per row, and each record uses the header line as its keys, in the order the columns appear. Two spaces indent the file, non-English text is written as it is rather than as \u codes, and the file is UTF-8 with no byte order mark. These are the rules behind it:

Every value is a string

The converter writes "1", "true" and "01100", never 1, true or 1100. That's deliberate. A CSV holds no record of what each column was meant to be, so any converter that turns text into numbers is guessing, and a wrong guess loses data: a ZIP code drops its leading zero and 1.50 comes back as 1.5. Keeping strings means nothing is changed between your file and your JSON, and dates such as 2024-01-15 stay as written too.

If your code needs real numbers, convert the fields you know are numeric after loading the file, with Number() in JavaScript or int() and float() in Python. If the data lives in Excel anyway, save it as .xlsx and use XLSX to JSON instead. Excel stores the type of each cell, so numbers stay numbers there and TRUE and FALSE cells become true and false.

The separator

Comma, semicolon, tab and | are all read. The converter counts each one in the header line, ignoring any inside quotes, and the most common wins, with a tie going to the comma. Some files start with a line that reads sep=;, a hint Excel understands. The converter takes the separator from it and drops the line.

The header line

  • The header is the first line that isn't blank, so empty lines above it are skipped.
  • Names are trimmed. A column headed Age with a trailing space gives the key Age.
  • A blank heading becomes column_N, where N is the column's position, counting from 1.
  • A heading that appears twice gets _2 on the second one, then _3, so no value overwrites another.
  • A column with no heading and nothing in any row is left out altogether.

So this header line, with a trailing space, a blank and a repeat:

Name , Age,,Age
Ana,30,x,31

gave these keys when we ran it through our live converter on 13 November 2026:

[
  {
    "Name": "Ana",
    "Age": "30",
    "column_3": "x",
    "Age_2": "31"
  }
]

Quotes, empty cells and short rows

A value in double quotes can hold the separator, a line break or a quote written twice, following the CSV standard (RFC 4180). "Silva, Ana" becomes Silva, Ana, and "Ben ""B""" becomes Ben "B". An empty cell becomes "", never null, because the file can't tell the two apart. A row with fewer cells than the header gets "" for each missing one, and a row with nothing in it at all is skipped. A file with a header line and no rows under it gives [].

A real example from our tests

On 13 November 2026 we uploaded this file to our live converter. It has a ZIP code with a leading zero, a true/false column and two names with accents:

id,name,city,zip,active
1,Ana,Lisbon,01100,true
2,Zoë,Zürich,8001,false

About 17 seconds after we started the upload, it came back as this JSON:

[
  {
    "id": "1",
    "name": "Ana",
    "city": "Lisbon",
    "zip": "01100",
    "active": "true"
  },
  {
    "id": "2",
    "name": "Zoë",
    "city": "Zürich",
    "zip": "8001",
    "active": "false"
  }
]

The two rows became two records with the five header names as keys. 01100 kept its zero and true stayed a string, and Zoë and Zürich came through with their accents. You can download the CSV we uploaded and the JSON it produced to compare them.

The backend team ran its own production test the same day, with a file where one email cell is empty:

id,name,email,zip,joined
1,Ana Silva,ana@example.com,01100,2024-01-15
2,Ben Okafor,ben@example.com,10001,2024-02-03
3,Chen Wei,,02134,2024-03-21

Row 3 shows how the empty cell is written:

[
  {
    "id": "1",
    "name": "Ana Silva",
    "email": "ana@example.com",
    "zip": "01100",
    "joined": "2024-01-15"
  },
  {
    "id": "2",
    "name": "Ben Okafor",
    "email": "ben@example.com",
    "zip": "10001",
    "joined": "2024-02-03"
  },
  {
    "id": "3",
    "name": "Chen Wei",
    "email": "",
    "zip": "02134",
    "joined": "2024-03-21"
  }
]

Before launch, a CSV with 405,337 rows also converted on our test server.

Text encodings, and one known gap

A CSV saved on Windows or by an older program isn't always UTF-8, and accents come out wrong if the encoding is misread. The converter detects it before reading the rows:

  • UTF-8 works with or without a byte order mark (BOM), the three hidden bytes Excel adds when you save as "CSV UTF-8".
  • UTF-16 works when the file has a BOM.
  • Older Windows code pages are detected automatically. A Windows-1252 file went through the live converter on 13 November 2026, and João, São Paulo, René and Zürich all came out right. Windows-1250, Windows-1251, Shift_JIS, GBK and Big5 are handled by the same code and were checked on our test server before launch.
  • UTF-16 without a BOM is read wrongly. This is a known gap. If a file like that gives you garbled text, open it in a text editor, save it as UTF-8, and upload it again.

Limits, and files that won't convert

  • Each CSV file can be up to 20 MB. The upload box takes bigger files, but the converter stops anything over 20 MB with This file is larger than 20 MB. Try splitting it into smaller files.
  • There's no row limit of its own. The table can have up to 16,384 columns and 5,000,000 cells, and the cell limit is what caps a long file.
  • The JSON it writes can be up to 200 MB, and a conversion can run for up to 960 seconds. Over either one, the message asks you to split the file.
  • A file with 0 bytes, or with nothing but spaces and blank lines, is refused with This file is empty.
  • A file that isn't text at all, such as an image renamed to .csv, gives We couldn't read this spreadsheet. The file may be damaged or password-protected.

To go the other way and turn a JSON file into a table, use JSON to CSV. For a CSV that needs to end up in Excel rather than in code, see the CSV converter page for the other formats it can become.

Last updated: 13 November 2026 · ChangeMyFile

What changed: New page, added when JSON support launched.

Tested: 13 November 2026, on our live converter: our sample CSV of two rows, with a ZIP code starting with 0, a true/false column and accented names, became the JSON shown above in about 17 seconds. Every value came out as a string, 01100 kept its zero, and the accents were unchanged.

RelatedAlso convert to JSON from