KKwikfig.

CSV to JSON Converter

Convert CSV to a JSON array of objects — delimiter detected automatically, quoted fields handled properly — and convert JSON back to CSV in the same tool. Runs entirely in your browser — your numbers never leave this device.

Direction
CSV input
JSON output
Rows
3

How it works

CSV → JSON: row 1 supplies the keys; each later row becomes one object {key 1: field 1, key 2: field 2, …} | A quoted field may contain the delimiter itself, line breaks, and doubled quotes ("" reads as one literal ") | Every value stays a string — 34 comes out as "34", never as the number 34

Paste CSV and the converter parses it properly before converting anything — a real parser following the CSV conventions (RFC 4180), not a split on commas. A field wrapped in double quotes may contain the delimiter, line breaks and quotes of its own, with a doubled quote standing for one literal quote; that is how a spreadsheet writes a name like "Amina, S." into a single cell. The delimiter — comma, semicolon, tab or pipe — is detected from the first line automatically, so exports from locales where Excel writes semicolons convert without setup. With headers on (the default), the first row names the keys and each remaining row becomes one JSON object; with headers off, the output is an array of arrays, exactly as parsed.

The reverse direction lives in the same tool: paste a JSON array of flat objects and it comes back as CSV, with the header row built from every key found across the objects, and any value containing a comma, quote or line break automatically quoted. Arrays of arrays convert row for row, and a list of plain values becomes a single column headed value. Nested objects inside a value are written as compact JSON text in that cell — flat data is what CSV can honestly hold, and deeply nested JSON is a sign the data should stay JSON.

The trap to know before you build on the output: CSV carries no types. Every field is text, so ages, prices and counts arrive in JSON as strings — "34", not 34 — and leading zeros, long IDs and dates survive only because they were never reinterpreted. Convert types in your code, deliberately. And as always on Kwikfig, the conversion happens in your browser: pasted exports and records are never uploaded or stored.

Worked examples

A quoted field containing the delimiter

Input
CSV = name,age / "Amina, S.",34
Working
The quotes around Amina, S. protect the comma inside the name, so the row has two fields, not three. The header row supplies the keys, and 34 stays a string because CSV has no numbers.
Result
[ { "name": "Amina, S.", "age": "34" } ]

Two rows, with an escaped quote inside a field

Input
CSV = name,age,city / "Amina, S.",34,Lahore / Bilal,28,"New ""Big"" York"
Working
Bilal's city is quoted, and each doubled quote inside it reads as one literal quote, giving New "Big" York. Both rows become objects under the same three keys, in file order.
Result
[ { "name": "Amina, S.", "age": "34", "city": "Lahore" }, { "name": "Bilal", "age": "28", "city": "New \"Big\" York" } ]

And back again: JSON to CSV

Input
JSON = [{"name":"Amina, S.","age":"34"},{"name":"Bilal","age":"28"}]
Working
The keys become the header row. Amina's name contains a comma, so that one cell is quoted on the way out; Bilal's needs no quotes. The two files are exact round-trip partners.
Result
name,age "Amina, S.",34 Bilal,28

Frequently asked questions

Why are all the JSON values strings?

Because CSV itself has no types — a CSV file is rows of text, and the converter will not guess that 34 is a number while 034 is a phone number's leading zero. Guessing corrupts exactly the fields that look numeric but are not (IDs, codes, account numbers). Every value arrives as a string, and you convert the fields you mean to convert in your own code.

My file uses semicolons instead of commas. Will it work?

Yes. The delimiter is detected from the first line by counting candidate characters outside quotes — comma, semicolon, tab and pipe are all recognised. A semicolon file such as a;b / 1;2 converts to [{"a": "1", "b": "2"}] with no settings to change. Semicolon CSV is the default export in much of Europe, where the comma is the decimal separator.

How are quotes inside a field handled?

By the standard CSV rule: wrap the field in double quotes, and write each literal quote inside it twice. "New ""Big"" York" parses as the single field New "Big" York. A quote in the middle of an unquoted field has no special meaning — if a value contains the delimiter, a line break or a quote that matters, the whole field must be quoted.

What happens to rows with too few or too many fields?

Missing fields become empty strings under their headers, so every object has the same keys; extra fields beyond the header count have no key to live under and are dropped. If your output looks short a column, a stray unquoted delimiter in one row is the usual cause — that row has silently grown a field.

Can it convert JSON back to CSV?

Yes — the reverse mode is in the same tool. A JSON array of flat objects becomes a header row plus one row per object, with cells quoted exactly when they need to be (the worked example above round-trips). Nested objects are written as compact JSON text inside their cell, because a spreadsheet cell cannot hold structure.

Is my CSV data uploaded?

No. Parsing and converting run entirely in your browser — pasted exports, customer lists and records never leave your device and are not stored.

Related tools

More in Developer Tools · Browse all tools