Skip to content

File & Data Tools

Convert CSV to JSON

Each row becomes an object keyed by the header row. Values are kept as strings — no silent type guessing.

  • Free, no signup
  • No upload — runs on your device
  • No watermark
  • Unlimited use

CSV to JSON

Processed locally
Drop a CSV file here

The first row is used as keys

Automatic type conversion is a bug, not a feature

Most CSV-to-JSON converters try to be helpful: 42 becomes the number 42, true becomes the boolean true, null becomes null. Then your phone number +441234567890 becomes the number 441234567890, your version string 1.0 becomes 1, and your product code 0x1F becomes 31.

Worse, the inference is per-value rather than per-column. One row with an empty cell in a numeric column and you have a JSON array where most objects have a number and one has an empty string — which crashes the consumer that reasonably assumed the type was uniform.

This tool emits every value as a string. That is a deliberate refusal to guess. If you want numbers, cast them in the language you are loading the JSON into, where you know the schema and the failure mode. A conversion tool does not know either.

How it works

  1. Drop in a CSV
  2. Toggle pretty-printing if you want indentation
  3. Copy the JSON, or click Download
Why nothing uploads. Every operation on this page happens inside your browser using JavaScript and WebAssembly. Your file is read into memory, processed, and offered back as a download. It is never transmitted. Disconnect from the internet after this page loads and the tool keeps working.

Frequently asked questions

Why are all my numbers strings in the output?
Because guessing types from CSV text is unreliable — it turns phone numbers into integers and version strings into floats. Cast the values in your own code, where you know the intended schema.
What shape is the JSON?
An array of objects. Each object is one CSV row, with keys taken from the header row and values as strings.
How are empty cells represented?
As empty strings, not null. This keeps the type of every value in a column consistent, which is what most consumers assume.
Can I get nested JSON from a flat CSV?
Not from a flat CSV, because the nesting structure is not expressed anywhere in the file. Convert to flat objects here, then reshape in code.
Does the pretty-print option change the data?
No, only the whitespace. Compact output is smaller; indented output is readable. Both parse identically.