How to Convert CSV to JSON (and Back)
Quick answer: open the free CSV ⇄ JSON Converter, drop in your CSV, and click Convert. Each row becomes a JSON object whose keys are your column headers, output as a pretty-printed array. Switch the direction to convert JSON back to CSV.
What the output looks like
Given this CSV:
name,email,plan
Ada,ada@example.com,pro
Lin,lin@example.com,free
the converter produces:
[
{ "name": "Ada", "email": "ada@example.com", "plan": "pro" },
{ "name": "Lin", "email": "lin@example.com", "plan": "free" }
]
This array-of-objects shape is what most APIs, NoSQL databases (like MongoDB imports) and JavaScript applications expect.
Step by step
- Open the CSV ⇄ JSON Converter.
- Make sure the direction is CSV → JSON and drop in your file. The first row is used as the keys.
- Click Convert and download the
.jsonfile.
For the reverse, choose JSON → CSV and drop in a JSON file containing an array of objects. Keys become column headers; objects become rows. If your objects have different keys, the columns are unified automatically.
Things to know
- All values are strings. CSV has no types, so
42becomes"42". If your destination needs numbers or booleans, cast them on import. - Nested JSON flattens poorly. JSON → CSV works best with flat objects. Nested objects are serialized as text in a single cell.
- Large files are fine. Parsing runs in a background worker, so the page stays responsive.
- Privacy: conversion happens entirely in your browser. Nothing is uploaded, so API keys or customer data in your files stay on your machine.
Related tasks
Cleaning data before converting it usually pays off: remove duplicate rows first, merge multiple exports into one file, or split a huge CSV into manageable parts.