Skip to content

CSV to JSON Converter

Paste CSV or JSON and convert between them, both directions. Uses a proper CSV parser — quoted fields, commas and newlines inside quotes, and escaped quotes are all handled correctly, not just split on the first comma.

  • Both directions: CSV → JSON and JSON → CSV
  • Real CSV parsing, not a naive comma split
  • Handles quoted commas, newlines and escaped quotes
  • Missing columns fill in as empty strings
  • Runs fully client-side

Converter

Parsed locally, nothing uploaded

JSON output

How to convert between CSV and JSON

  1. 01

    Pick a direction

    Choose CSV → JSON or JSON → CSV.

  2. 02

    Paste the input

    Paste CSV with a header row, or a JSON array of flat objects.

  3. 03

    Copy the result

    The converted output updates live and can be copied in one click.

Why a naive `.split(',')` breaks real CSV#

A spreadsheet export that contains a comma inside a value — an address, a product name with a comma in it, a quoted quote — wraps that value in double quotes: "Doe, Jane". Splitting on every comma blindly turns that one field into two columns and shifts everything after it by one, silently corrupting the row. This tool implements the actual CSV grammar (RFC 4180): a quoted field can contain commas and newlines, and a doubled quote "" inside a quoted field means a literal quote character — the same rules Excel and Google Sheets use when they export.

What happens with uneven rows#

Real-world CSV is rarely perfectly rectangular. A row with fewer fields than there are header columns gets the missing columns filled in as empty strings, so the JSON stays valid instead of producing objects with different shapes. A completely blank line between rows is skipped rather than turned into a phantom empty record.

Converting JSON back to CSV#

The reverse direction expects a flat JSON array of objects — the column set is the union of every key seen across all objects, in the order each key first appears, not alphabetical. A value that is itself an object or array is serialized as a JSON string inside its cell rather than rejected, since that is usually more useful than an error when one field in an otherwise-flat structure happens to be nested.

Frequently asked questions

Does this handle commas inside quoted CSV fields correctly?

Yes — it implements the RFC 4180 CSV grammar, so quoted fields can contain commas, newlines, and doubled quotes (`""` for a literal `"`) without breaking the column alignment.

What happens if a CSV row has fewer columns than the header?

The missing columns are filled in as empty strings, so every resulting JSON object has the same shape.

What JSON shape does the JSON → CSV direction expect?

A flat array of objects. The column order follows the order keys first appear across all objects. A nested object or array value is stringified into its cell rather than rejected.

Is my data uploaded anywhere?

No. Parsing and conversion happen entirely in your browser — nothing is sent to a server.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.