CSV to JSON Converter

Convert CSV data into clean JSON in real time. Paste CSV or upload a file, choose your output format, and copy or download valid JSON for APIs, apps and databases.

  • 100% free
  • No sign-up
  • Private & local
  • Works on mobile
Drop a CSV fileor browse files · or paste below

Private by design: your files are processed locally in your browser and are never uploaded to any server.

What Is a CSV to JSON Converter?

A CSV to JSON converter turns comma-separated values, the plain-text table format exported by Excel, Google Sheets, databases and CRMs, into JSON (JavaScript Object Notation), the data format used by web APIs, JavaScript apps, NoSQL databases and configuration files. Each CSV row becomes a JSON object, and the header row supplies the property names.

For example, the CSV row Alice,30,true under the header name,age,active becomes {"name": "Alice", "age": 30, "active": true}. This converter does that instantly as you type, in your browser, with no data sent to any server.

How to Convert CSV to JSON

  1. Add your CSV. Paste CSV text into the input box or drop a .csv file onto the upload bar.
  2. Check the options. The delimiter is auto-detected. Choose the output shape, indentation and type conversion.
  3. Review the JSON. Valid JSON appears on the right in real time, and any problem is reported clearly.
  4. Copy or download. Copy the JSON to your clipboard or save it as a .json file.

Features

  • RFC 4180 compliant parsingHandles quoted fields, commas inside quotes, escaped double quotes and line breaks within cells.
  • Delimiter auto-detectionWorks with comma, semicolon (common in Europe), tab and pipe-separated files.
  • Smart data typesNumbers, booleans and null are converted to real JSON types instead of strings.
  • Nested JSONHeaders like address.city can become nested objects.
  • Four output shapesArray of objects, array of arrays, keyed object or column arrays.
  • Private and instantLarge files convert in milliseconds without uploading.

CSV to JSON Output Formats Explained

FormatExampleUse it for
Array of objects[{"name":"Alice","age":30}]REST APIs, JavaScript apps, MongoDB imports
Array of arrays[["name","age"],["Alice",30]]Charts, spreadsheet libraries, compact storage
Keyed object{"Alice":{"age":30}}Fast lookups by ID or unique key
Column arrays{"name":["Alice"],"age":[30]}Data science, plotting and column-based analysis

Common Uses

  • Importing spreadsheet data into a web application or JavaScript front end.
  • Preparing seed data or fixtures for databases and automated tests.
  • Converting exported reports into JSON for a REST or GraphQL API.
  • Creating JSON configuration files from data maintained in Excel.

Tips for Clean Conversions

  • Make sure the first row contains unique, meaningful column names. They become your JSON keys.
  • Turn off "Convert numbers" to keep values such as ZIP codes, phone numbers and IDs with leading zeros as strings.
  • If the output looks like one long column, set the delimiter manually (for example semicolon for European Excel exports).
  • Use "Skip empty values" to produce compact JSON without empty strings.

Worked Example: CSV to JSON

Suppose you export this contact list from a spreadsheet:

id,name,address.city,active
1,"Smith, Bob",London,true
2,Chloé Martin,Paris,false

With the default settings (header row, type conversion, array of objects) the converter produces:

[
  { "id": 1, "name": "Smith, Bob", "address.city": "London", "active": true },
  { "id": 2, "name": "Chloé Martin", "address.city": "Paris", "active": false }
]

Notice that the quoted comma in "Smith, Bob" stays inside the name, id becomes a number, and active becomes a real boolean. Enable Nested objects from dot headers and address.city turns into "address": { "city": "London" }, which is exactly the shape most APIs expect.

Using the JSON in Your Code

The output is standard JSON that every language can read directly: JSON.parse() in JavaScript, json.loads() in Python, json_decode() in PHP, or encoding/json in Go. For MongoDB, import the array with mongoimport --jsonArray. For a REST API, send it as the request body with the Content-Type: application/json header.

CSV Quirks the Parser Handles for You

  • Byte-order marks (BOM) at the start of files exported from Excel.
  • Windows (CRLF), Unix (LF) and old Mac (CR) line endings.
  • Empty trailing lines and rows with fewer or more columns than the header.
  • Duplicate column names, which get numbered suffixes so no data is overwritten.

Frequently Asked Questions

Can I convert CSV without a header row?

Yes. Untick "First row is header" and the columns are named column1, column2 and so on, or choose "Array of arrays" to output rows exactly as they appear.

Is this CSV to JSON converter free?

Yes. It is free to use without limits, sign-up or ads blocking the tool.

Does it handle commas inside quoted values?

Yes. Fields wrapped in double quotes can contain commas, line breaks and escaped quotes (""), following the RFC 4180 CSV standard.

Why are my numbers strings in the JSON?

Enable "Convert numbers & booleans". Values such as 42, 3.14, true and null are then output as real JSON types. Numbers with leading zeros stay as text to avoid data loss.

How large a CSV file can I convert?

Files of several megabytes (tens of thousands of rows) convert in seconds. The limit depends on your device's memory, because nothing is uploaded.

Is my data secure?

Yes. The conversion runs entirely in your web browser, so your CSV never leaves your computer.