CSV to JSON

Paste CSV and get JSON at once, with errors pointed by line and column, then copy or download the result.

loading CSV to JSON
About this tool

What are CSV and JSON?

CSV is a table in plain text: the first line names the columns and each following line is a row, with cells separated by commas (or semicolons, tabs or pipes). JSON is the text format of web APIs: objects in braces, lists in brackets, strings always in double quotes, and nothing else.

The usual case is a spreadsheet export that a script, an API mock or a NoSQL import must read: each row becomes an object whose keys are the column names.

This page opens the data converter already set to CSV → JSON. Paste the text, read the result as you type, then copy it or download it as a file. Errors show the line and the column. Nothing is sent anywhere: the conversion runs in your browser.

CSV vs JSON

CSVJSON
Extension.csv.json
Media typetext/csvapplication/json
Commentsnono
Data typestext only (numbers are a reading convention)string, number, true/false, null, object, array
Nestingnone: one flat tableany depth
Typical usespreadsheets, exports, bulk importsAPIs, package.json, logs
SpecificationRFC 4180RFC 8259

When to convert CSV to JSON

  • Convert to JSON when another program or an API will read the data.
  • Keep CSV when the data goes to a spreadsheet, a database import or a report.

What changes in the conversion

  • The first line is the header. Numbers and true/false become real numbers and booleans (you can turn this off); values with leading zeros, like ZIP codes 01310-100 or 007, stay text.
  • The separator is detected: comma, semicolon (common in Excel in Portuguese and Spanish), tab or pipe.

How to convert CSV to JSON

  1. Paste your CSV in the input box (the page opens with an example you can replace).
  2. Read the JSON on the right; it updates as you type. If something is wrong, the message says the line and column.
  3. Adjust the options if you need: indentation, sorted keys or type detection.
  4. Copy the result or download it as a .json file.

Example

This CSV input:

id,name,city,zip,active
1,Ana Souza,Recife,01310-100,true
2,Bruno Lima,Porto Alegre,90010-000,false
3,"Silva, Carla",Curitiba,80010-000,true

becomes this JSON, exactly as the converter writes it:

[
  {
    "id": 1,
    "name": "Ana Souza",
    "city": "Recife",
    "zip": "01310-100",
    "active": true
  },
  {
    "id": 2,
    "name": "Bruno Lima",
    "city": "Porto Alegre",
    "zip": "90010-000",
    "active": false
  },
  {
    "id": 3,
    "name": "Silva, Carla",
    "city": "Curitiba",
    "zip": "80010-000",
    "active": true
  }
]

Frequently asked questions

Is my CSV sent to a server?

No. Conversion happens in your browser, so secrets in a config never leave your computer.

Does CSV to JSON keep comments?

CSV has no comments, so there is nothing to lose. JSON comments: no.

What happens to nested data?

CSV nesting: none: one flat table. JSON nesting: any depth. The structure is kept as it is.

Report a problem