CSV to JSON Converter
Paste CSV to get clean JSON — or paste JSON to get CSV back. Handles quoted fields, commas inside values, headers and tab/semicolon delimiters. Nothing leaves your browser.
Two formats, one dataset
CSV (comma-separated values) is the universal language of spreadsheets: Excel, Google Sheets and every database exports it. JSON is the universal language of code: APIs, configuration files and JavaScript applications consume it. The same table of data constantly needs to cross between those worlds — a client sends an Excel export that your script needs as JSON, or an API response needs to land in a spreadsheet — and hand-editing the brackets and quotes is a recipe for broken data.
How to use this converter
Paste your data, pick the direction, and the output appears as you type. For CSV input, set the delimiter (comma, semicolon — common in European exports — or tab, which is what copy-pasting from Excel produces) and tick whether the first row contains column names; with headers on, each row becomes a JSON object with named fields, otherwise rows become arrays. For JSON input, provide an array of objects (keys become CSV headers) or an array of arrays.
What makes CSV parsing tricky
Real CSV allows commas, quotes and even line breaks inside quoted fields, with quotes doubled to escape them. Naive split-on-comma converters silently shred such rows. This tool implements the proper RFC-4180 quoting rules in both directions, so round-trips preserve the data exactly.
Worked example
A shop's customer export contains "Khan, Ali",Karachi. Converted with headers name,city, the JSON comes out as {"name": "Khan, Ali", "city": "Karachi"} — the comma inside the name intact. Going the other way, an API's JSON array of 500 orders pastes straight in, and the CSV output opens in Excel with proper columns, ready for a pivot table. No scripts, no uploads, no mangled Urdu text (the tool is UTF-8 clean).
When is this useful?
Developers mocking API data from a spreadsheet, analysts moving API responses into Excel, shop owners importing product lists into e-commerce platforms that want JSON, students preparing datasets, and anyone debugging why an import failed (paste the CSV here — if the row count looks wrong, the delimiter or quoting is the culprit). For encoding the result safely into a URL or config, the Base64 encoder is one tab away.
Frequently asked questions
My CSV has semicolons instead of commas — why?
Locales that use comma as the decimal separator (much of Europe) export CSV with semicolon delimiters. Switch the delimiter dropdown to semicolon and it will parse correctly.
How do I convert Excel data directly?
Copy cells in Excel and paste here with the delimiter set to Tab — clipboard data from spreadsheets is tab-separated. Or save as .csv and paste the file's contents.
What JSON shape does the converter accept?
An array of objects (keys become headers; missing keys become empty cells) or an array of arrays (rows as-is). A single object or non-array JSON shows a clear error.
Is my data uploaded anywhere?
No — parsing and conversion run entirely in your browser. Customer lists and financial data never leave your device.
How large a file can it handle?
Tens of thousands of rows are fine in a modern browser. For files of hundreds of megabytes, a command-line tool or script is the better instrument.