CSV to JSON Converter

Convert CSV rows into a JSON array of objects, using your header row as the keys — ready for APIs, code and config. Nothing you paste leaves your browser — this tool runs entirely on your device.

Share as link: your text is compressed and stored inside the link itself, after the #. That part of a web address is never sent to our server — we never see it, log it, or store it. Anyone with the link can read the text, and the link can never be taken down or revoked, because no copy exists on a server. Don't share secrets this way. Some chat apps mangle long links.

What this tool does

Spreadsheets are where data is collected and JSON is where it's used, so the CSV-to-JSON hop is a fixture of development and data work. Paste CSV — exported from Excel, Google Sheets, a CRM or a database — and this converter reads the first row as keys and turns every remaining row into a JSON object, pretty-printed and ready to paste into code, an API request or a fixture file. The parser handles the parts of CSV that break naive splitting: quoted fields containing commas, escaped double-quotes, and line breaks inside quoted values. All values come out as strings, which is the honest representation of CSV — convert numbers in your code if you need them typed.

How to use it

  1. Paste your CSV into the box above, header row included.
  2. Click “Convert to JSON”.
  3. Copy the JSON array into your project or API call.

Example

Before:

name,city
Ana,Lisbon
Ben,Austin

After:

[
  {
    "name": "Ana",
    "city": "Lisbon"
  },
  {
    "name": "Ben",
    "city": "Austin"
  }
]

Good to know

Check your header row before converting: duplicate or blank headers produce duplicate or empty keys in the output. If your file is tab-separated (a straight copy-paste from Excel cells usually is), run it through the TSV converter first, or use the TSV to Markdown tool if a table is what you actually need.

Frequently asked questions

Why are numbers strings in the output?

CSV has no types — a cell is text. Emitting strings is the faithful conversion; guessing types would corrupt values like phone numbers and leading-zero codes.

Does it handle quoted commas?

Yes. Fields wrapped in double quotes can contain commas, quotes (doubled) and even line breaks, per the CSV rules spreadsheet apps follow.

What if there's no header row?

The first row becomes the keys, so without a header your first data row is consumed as names. Add a header row first for sensible output.

Related tools

JSON to CSV

The reverse conversion.

JSON Formatter

Validate the resulting JSON.

TSV ↔ CSV Converter

Convert tab-separated data to CSV first.

CSV to HTML Table

Turn CSV into a publishable web table.