CSV to JSON

Convert CSV into a JSON array of objects, with header detection and optional type inference.

Input (CSV)
Loading editor…
JSON Output
Loading editor…
Size: 0 bytesLines: 0

Related Tools

Learn more about the CSV to JSON

What Does This CSV to JSON Converter Do?

This tool parses CSV into a JSON array of objects. Paste CSV — an exported report, a spreadsheet, a data dump — or drag and drop a .csv file, and each row becomes one object, with column headers becoming keys.

Parsing follows RFC 4180, so a field can safely contain a comma or line break as long as it's quoted, and a literal quote inside a quoted field (written as "") is handled correctly. With type inference on, numbers, true/false, and empty cells come back as real JSON numbers, booleans, and null instead of strings; turn it off to keep every value as text. Rows with missing or extra columns don't break the conversion.

Everything runs locally in your browser; your CSV is never uploaded to a server.

Why Convert CSV to JSON?

Importing Spreadsheet Data

Data collected in Excel or Google Sheets often needs to become JSON before it can be sent to an API, seeded into a database, or used as test fixtures.

Completing the Round Trip

Paired with JSON to CSV, this closes the loop — export JSON as a spreadsheet for someone to edit, then bring their edits back in as JSON.

Working with Exported Reports

Analytics platforms, payment processors, and admin panels frequently only offer CSV export. Converting to JSON makes that data scriptable again.

Real Types, Not Just Strings

Raw CSV is all text. Type inference means an age column comes back as a number and an active column as a boolean, ready to use without a manual parsing step.

Example

With type inference on: id and the plain zip value become numbers, the UK postcode fragment 0161 stays a string to preserve its leading zero, active becomes a real boolean or null for the missing value, and the embedded comma and escaped quote in row two are parsed correctly.

Before (CSV)
id,name,city,zip,active
1,Ada Lovelace,"London, UK",SW1,true
2,"Grace ""Amazing"" Hopper",New York,10001,false
3,Alan Turing,Manchester,0161,
After (JSON)
[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "city": "London, UK",
    "zip": "SW1",
    "active": true
  },
  {
    "id": 2,
    "name": "Grace \"Amazing\" Hopper",
    "city": "New York",
    "zip": 10001,
    "active": false
  },
  {
    "id": 3,
    "name": "Alan Turing",
    "city": "Manchester",
    "zip": "0161",
    "active": null
  }
]

Features

RFC 4180 Parsing

Handles quoted fields, commas and line breaks inside quotes, and doubled "" as an escaped quote — the same rules real spreadsheet exports use.

Header Row Detection

Uses the first row as field names by default, or turns it off to auto-generate column1, column2… for headerless CSV.

Type Inference

Numbers and true/false/empty values become real JSON numbers, booleans, and nulls instead of staying as strings — toggle it off to keep everything as text.

Upload a File

Drag and drop or upload a .csv file to convert it directly, no copy-pasting required.

Download JSON

Save the result as a standalone .json file for use in your project.

How to use

Paste your input in the left editor. The output appears automatically on the right. Use the toolbar buttons to copy, download, or transform the result.

  1. Paste or type your content in the input editor on the left.
  2. The formatted output is generated automatically.
  3. Use Copy, Download, or other actions from the output toolbar.
  4. Click the expand icon to view the output in fullscreen.
FAQ

Is this CSV to JSON converter free?

Yes, it is completely free to use with no limits, signup, or account required.

Is my CSV data uploaded to a server?

No. Parsing runs entirely in your browser using JavaScript, whether you paste CSV or upload a file. Your data never leaves your machine.

Does it handle quoted fields with commas or quotes inside them?

Yes. The parser follows RFC 4180: a field wrapped in quotes can safely contain commas or line breaks, and a literal quote inside it is written as two quotes ("") and decoded back to one.

What if my CSV doesn’t have a header row?

Turn off "First row is headers" and the tool auto-generates column names (column1, column2, …) instead of using the first row as field names.

What does type inference do?

With it on, values like 42, true, false, and empty cells become real JSON numbers, booleans, and null instead of strings. Numbers with a significant leading zero (like a postcode fragment) are kept as strings so the zero isn’t lost. Turn it off to keep every value as a plain string.

What happens with rows that have missing or extra columns?

A row with fewer values than there are headers gets an empty value for the missing fields. A row with more values than headers has the extra values ignored, so a ragged CSV never breaks the conversion.

Can I upload a file instead of pasting CSV?

Yes. Drag and drop a .csv file onto the input panel, or click the upload icon in the panel header to browse for one. Files up to 5MB are supported.

Can I convert large CSV files?

Yes, conversion handles large files smoothly since everything runs client-side in the Monaco editor, the same editor used in VS Code.