Skip to content

Convert CSV to JSON

The first row becomes the keys, every following row becomes an object. The parser handles the CSV cases that break string-splitting: fields wrapped in quotes, quotes escaped by doubling, commas inside quoted fields, and line breaks inside quoted fields. Tab and semicolon delimiters are supported for exports from European locales and TSV files.

Example

Input
name,role
Ada,engineer
Grace,admiral
Output
[
  {
    "name": "Ada",
    "role": "engineer"
  },
  {
    "name": "Grace",
    "role": "admiral"
  }
]

Header cells become keys verbatim, including any spaces or capitalization they carry.

Input and output

Input is CSV with a header row; the Delimiter option switches between comma, tab, and semicolon. Output is a JSON array of flat objects with string values.

Every value stays a string: this converter does not guess which columns are numbers or booleans, because guessing wrong corrupts data silently (leading zeros in phone numbers, postal codes, version strings). Rows shorter than the header get empty strings for the missing cells. The Toolbox also converts the other direction, JSON to CSV.

Privacy

This tool runs entirely in your browser. The input is never uploaded, logged, or stored; close the tab and it is gone. The one deliberate exception in the whole Toolbox is the explicit Save as new paste button on the output, which does exactly what it says and nothing before you press it.

The conversion runs in the page. CSV exports are routinely full of customer rows, which is precisely the data that should not pass through a stranger's server on its way into your code.

Common uses

  • Turning a spreadsheet export into fixture data for tests
  • Feeding a CSV report into a script or API that expects JSON
  • Inspecting an export's actual column names and values as structured data
  • Converting a small dataset without spinning up a script for it

Need to share the result?

Run the tool, then use Save as new paste on the output to get a link you can send. The paste is unlisted, expires in a week, and the recipient needs no account. Or start from a blank paste if you already have the text.

Related tools

More tool pages: Format and validate JSON, Decode Base64 to text, Decode a JWT, Generate UUIDs, Convert a Unix timestamp to a date. Everything else lives in the full Toolbox, which also chains tools into workflows.