Get started
HomeData & ConvertersCSV to JSON
Data & ConvertersRuns in your browser · files never uploaded

CSV to JSON

Structured CSV → JSON

4.5· 94 votes
A CSV-to-JSON converter parses a delimited file and maps each row to a JSON object keyed by the header row. StuHub auto-detects the delimiter (comma, semicolon, tab, pipe), handles RFC 4180 quoted fields, and runs entirely in your browser — large sheets never leave your device.
Your file never leaves this browser. Everything runs on your device — no uploads, no server storage, no retention.How it works →
✓ Valid
CSV input
JSON output
[
  {
    "name": "Ada Lovelace",
    "age": 36,
    "city": "London",
    "active": true
  },
  {
    "name": "Alan Turing",
    "age": 41,
    "city": "Manchester",
    "active": true
  },
  {
    "name": "Grace Hopper",
    "age": 85,
    "city": "New York",
    "active": false
  }
]
Preview — first 4 rows
nameagecityactive
Ada Lovelace36Londontrue
Alan Turing41Manchestertrue
Grace Hopper85New Yorkfalse

What is CSV to JSON?

Convert CSV to JSON and back with full RFC-4180 handling of quotes, escapes, and embedded newlines. Automatically detects the delimiter (comma, semicolon, tab) and header row. Great for ingesting spreadsheet exports into code, turning an API's JSON response into a CSV you can open in Excel, or moving data between systems that insist on different formats.

How do I use CSV to JSON?

  1. Paste CSV or JSON into the input panel.
  2. The opposite format appears on the right.
  3. Copy or download the converted output.

CSV to JSON by the numbers

Delimiters
, ; tab |
Quoting
RFC 4180 (double-quote escape)
Header detection
Automatic + override
Max comfortable size
~20 MB
Output
JSON array-of-objects or array-of-arrays

Common use cases for CSV to JSON

  • Importing an Excel export into a JSON API.
  • Prepping a user list for a config file.
  • Turning a survey export into a seed for a JSON database.
  • Flattening a product catalogue for a static-site generator.
  • Piping a support-ticket export into a dashboard.

Common pitfalls and how to avoid them

  • First row becomes data, not keysToggle "Has header" on. If the file genuinely has no header, keep it off and consume an array-of-arrays.
  • EU Excel exports split on the wrong characterPick semicolon as the delimiter explicitly — commas are decimal separators in EU locales.
  • Quoted commas break parsingMake sure quoted fields use " not curly quotes. Curly quotes come from Word; re-export from the original source.

When should I use CSV to JSON?

CSV ↔ JSON covers the common direction. For JSON → CSV only (with more flattening options), use JSON to CSV. For Excel (.xlsx) conversions, use Excel to CSV / CSV to Excel / JSON to Excel.

Frequently asked
Does the tool auto-detect the delimiter?

Yes. Comma, semicolon, tab, and pipe are detected automatically. You can override via the delimiter picker if detection gets it wrong.

What happens to the header row?

By default the first row becomes object keys ({ name, age, ... }). Disable "Has header" for an array-of-arrays output instead.

Does it handle quoted fields with commas inside?

Yes — RFC 4180 quoting is supported, including escaped double-quotes ("" inside a quoted field).

Is my file uploaded anywhere?

No. Everything runs in your browser. Your files never leave your device, and there is no server component for this tool.

Related in Data & Converters
JSON to CSV
Excel to CSV
CSV to Excel
XML to CSV
JSON to Excel
TSV to CSV
Markdown to HTML
HTML to Markdown