CSV / JSON Converter Developer Tool

Convert between CSV and JSON, entirely in your browser.

Moving data between a spreadsheet export and an API payload usually means converting CSV to JSON or JSON to CSV by hand. This free converter is a developer tool that handles quoted fields, embedded commas, and nested values correctly in both directions, running entirely client-side so your data never leaves your browser.

CSV

JSON

Runs entirely in your browser — no data is sent anywhere.

CSV isn't really one format

Unlike JSON, CSV was never formally standardized until RFC 4180 arrived decades after the format was already in widespread use, and even that RFC is more a description of common practice than a strict rulebook every tool follows. In practice, "CSV" covers a family of similar-but-not-identical formats: some use commas, others semicolons (common in locales where the comma is a decimal separator) or tabs. Line endings vary between \n and \r\n depending on the exporting tool's operating system. Quoting rules for fields containing the delimiter, quotes, or newlines are usually compatible with RFC 4180 but not always applied consistently by every spreadsheet program or database export.

That inconsistency is why a hand-rolled split(',') breaks the moment a field contains an embedded comma or a quoted newline, and why a proper parser has to track quote state character by character rather than just splitting on delimiters. This tool's CSV parser handles quoted fields, doubled quotes as an escape for a literal quote character ("" inside a quoted field), and commas or newlines embedded inside quotes — the cases that break naive parsing.

How nested JSON maps to flat CSV

JSON supports arbitrary nesting — objects inside objects, arrays of objects, mixed types within an array — while CSV is fundamentally a flat grid of rows and columns. Converting JSON to CSV only works cleanly when the JSON is (or can be treated as) an array of flat objects, where each object becomes one row and its keys become the header row's columns. When a value in that object is itself an object or array, this tool serializes it back to a JSON string within the cell, since there's no lossless flat representation of nested structure in a single CSV column. Going the other direction, CSV to JSON is more predictable: each row becomes one flat JSON object keyed by the header row, since CSV never had nesting to reconstruct in the first place.

If your source objects don't all share the same keys, this tool takes the union of every key seen across all rows as the header, leaving a blank cell for rows missing that particular key — the same behaviour you'd get exporting a table with sparse columns from a spreadsheet.

Common use cases

CSV to JSON shows up most when pulling a spreadsheet export (from Excel, Google Sheets, or a database's own export feature) into an API payload, a seed script, or a JavaScript array for further processing. JSON to CSV runs the other way: turning an API response or a JSON log export into something that opens cleanly in a spreadsheet for a non-technical colleague, or for quick filtering and pivoting. Data migration between systems that speak different formats natively is another common case — exporting from one platform as CSV and needing JSON for the next tool in the pipeline, or vice versa.

Encoding gotchas

Two issues account for most "my CSV won't import cleanly" problems that have nothing to do with delimiters. The first is the UTF-8 byte order mark (BOM): some tools, notably Excel, prepend three invisible bytes to a UTF-8 CSV file to signal its encoding, and a parser that doesn't strip them will see a stray character glued onto the first header name. The second is line endings — a file saved on Windows uses \r\n while one saved on macOS or Linux typically uses just \n, and a parser that only splits on one will misparse the other. This tool normalizes both before parsing, so files from any common source should import consistently.