Convert CSV to JSON

Convert a spreadsheet export into a JSON array of objects, using the header row as keys. Your data never leaves the browser.

Drop your file here, or browse

Images, documents, spreadsheets, data files and subtitles. Your file stays on your device.

Your file is converted on this device and is never uploaded to a server.

From rows and columns to JSON objects

CSV is how spreadsheets and databases export tables, while JSON is what web apps, APIs and JavaScript code expect. Converting between them by hand is tedious and error prone, especially when values contain commas, quotes or line breaks.

This converter parses the CSV with PapaParse, a proven CSV parser, turns the first row into property names and writes each following row as an object. It detects the delimiter automatically, so semicolon-separated files from European versions of Excel work as well as comma-separated ones.

CSV vs JSON at a glance

Main differences between the CSV and JSON formats
FeatureCSVJSON
Full nameComma-Separated ValuesJavaScript Object Notation
TypeTabular dataHierarchical data
IntroducedEarly 1970s; described by RFC 4180 in 2005Early 2000s (RFC 4627 in 2006)
Created byNo single ownerDouglas Crockford; now ECMA-404 and RFC 8259
StructureFlat rows and columnsNested objects and arrays
CommentsNoNo
Data typesText only, no built-in typesString, number, boolean, null, object, array
Best forSpreadsheet exports and database importsAPIs, web apps and app settings
SupportExcel, Google Sheets, databases and every languageEvery programming language
MIME typetext/csvapplication/json

How to convert CSV to JSON

  1. Step 1: Export or save a CSV

    Use File, Save As, CSV in your spreadsheet, or take the export from your database or app.

  2. Step 2: Drop the .csv file

    Make sure the first row contains the column names.

  3. Step 3: Convert

    Rows are parsed with full support for quoted fields and turned into objects.

  4. Step 4: Download the JSON

    You get a pretty-printed .json file with an array of objects.

Parsing details

Delimiter detection

Commas, semicolons, tabs and pipes are recognized automatically.

Quoted fields

Values with commas, quotes or line breaks inside quotes are read correctly.

Clean headers

Spaces around header names are trimmed and a leading byte order mark is removed.

Empty lines skipped

Blank rows at the end of exports do not create empty objects.

Where CSV to JSON is useful

  • Seeding a web app. Turn a spreadsheet of products or users into fixture data.

  • Static site data. Feed JSON files to Astro, Next.js or Eleventy.

  • API testing. Build request bodies from spreadsheet rows.

  • Charts and maps. Many visualization libraries prefer JSON input.

Why every value is a string

CSV has no data types, so the converter keeps each value exactly as written, as a JSON string. That protects values that only look like numbers: ZIP codes such as 02134, phone numbers, product codes and very long IDs would be damaged by automatic number conversion.

If you need real numbers or booleans, convert the specific fields in your code, where you know which columns should be numeric. Empty cells become empty strings.

  • "02134" stays "02134", not 2134.
  • "TRUE" stays a string until you decide otherwise.
  • "1,234.50" is kept intact for your own parsing.

Header row requirements

The first line is always treated as the header. If your file has no header, add one before converting, otherwise the first data row becomes the property names.

Duplicate column names are made unique by the parser with a numeric suffix, so no values are overwritten. Blank header cells produce empty property names, which you may want to fill in first.

Tips for CSV to JSON

  • Use short, code-friendly headers such as first_name rather than First Name (optional).
  • Remove summary rows and notes from the bottom of exported reports.
  • Save the CSV as UTF-8 to keep accented characters intact.
  • Need a key/value lookup instead of an array? Transform the JSON in your code after converting.

CSV to JSON questions

What does the JSON look like?

An array of objects, one per row, with property names taken from the header row, pretty-printed with two-space indentation.

Are numbers converted to numbers?

No. Values are kept as strings to protect leading zeros and long identifiers.

Does it support semicolon-separated files?

Yes. The delimiter is detected automatically, including semicolons, tabs and pipes.

Can values contain commas and line breaks?

Yes, as long as they are enclosed in double quotes, which is how spreadsheets export them.

What about Excel files?

Use the XLSX to CSV converter first, or save the sheet as CSV from Excel.

Is my CSV uploaded?

No. The conversion runs in your browser.

Related conversions