$ SudoStuff

CSV to JSON

Turn CSV rows into a JSON array.

Processed locally in your browser. Nothing you type here is sent to our servers.

What does this tool do?

This turns CSV or TSV data into a JSON array of objects, using the header row for property names. Parsing is done by PapaParse, which correctly handles the parts of CSV that trip up a naive split on commas: quoted fields, escaped quotes, embedded commas and newlines inside a cell.

How to use it

  1. Paste your CSV, or the contents of a .csv or .tsv file.
  2. Leave the delimiter on Detect unless the guess is wrong.
  3. Press Convert to JSON.
  4. Copy the result or download it.

Untick First row is a header if your data starts immediately; rows then become arrays rather than objects.

Type inference

Every CSV value is text. With Infer types enabled, values that can be converted without losing information become real JSON types:

  • 42 and -3.5 become numbers.
  • true and false become booleans.
  • null becomes null.

Values that would change if converted are deliberately left as strings. 007 stays "007", 1.50 stays "1.50", and a phone number keeps its leading + — because silently turning a product code into the number 7 is the kind of bug that surfaces three weeks later.

Rebuild nested objects reverses dotted headers: a column named address.city becomes a nested address object. Use it when the CSV came from flattened JSON in the first place.

Common use cases

  • Turning a spreadsheet export into fixture data or a seed file.
  • Preparing a bulk payload for an API that expects JSON.
  • Inspecting a CSV whose quoting you do not trust.
  • Converting a data dump so you can query it with jq.

Limitations

  • Rows with more or fewer fields than the header are still converted, with a warning. Extra fields are collected under __parsed_extra.
  • Duplicate header names collide — the last column of that name wins.
  • Empty cells become empty strings, not null. CSV cannot distinguish the two.
  • Dates are left as strings, because there is no unambiguous way to know whether 03/04/2026 is March or April.
  • Very large files are limited by your device's memory, since the whole document is parsed in the browser.
↑↓ navigate ↵ open esc close