CSV to JSON Converter

A richer CSV-to-JSON conversion for when the defaults of the basic tool are not enough: pick a custom delimiter (comma, tab, semicolon, pipe), decide whether the first row holds headers, and toggle pretty versus compact JSON output. The result is either an array of objects keyed by headers, or an array of arrays when you turn headers off, useful for matrix-style data that has no natural column names.

How to configure the conversion

  1. 1

    Paste CSV data

    Any common flat-file format works; the parser respects quotes and escapes.

  2. 2

    Choose the delimiter

    Comma for standard CSV, `\t` for TSV, `;` for European CSV exports, `|` for pipe-delimited feeds.

  3. 3

    Toggle header mode

    On: first row names the JSON keys. Off: each row becomes an array of values inside the outer array.

  4. 4

    Pick pretty or compact

    Pretty adds line breaks and indentation for human readers; compact strips them for the smallest payload.

Choosing the right output shape for your data

The header toggle produces two different JSON shapes. Pick the one that matches what your consumer expects.

Array of objects (headers on)

[
  { "name": "Alice", "age": "30" },
  { "name": "Bob", "age": "25" }
]

This is the shape most REST APIs and front-end frameworks expect. Each row is a record; keys are stable column names.

Array of arrays (headers off)

[
  ["Alice", "30"],
  ["Bob", "25"]
]

Useful when the CSV is a matrix (a heat map, a correlation grid) or when the consumer is a chart library like D3 that wants positional data.

Delimiter reference

Common flat-file Delimiter Use
CSV , Default export in most North American tools.
TSV \t Clipboard paste from spreadsheets.
SSV (semicolon) ; European Excel exports (comma is decimal).
PSV (pipe) ` `

Pretty vs compact

  • Pretty JSON is 2-3x larger but easy to scan. Prefer it for test fixtures, request bodies you will commit to Git, and copy-paste into the browser console.
  • Compact JSON saves bytes over the wire and strips whitespace. Prefer it for production API payloads and localStorage writes.
  • Either format is valid JSON, no consumer cares which one you send.

Frequently Asked Questions

Type the literal two-character sequence \t into the delimiter input. The converter interprets that as a real tab character before parsing.

CSV has no type information, so the converter keeps every value as a string to avoid silently corrupting IDs like 00042 or decimals like 1.50. Cast to numbers in your consumer where needed.

Object keys must be unique, so later columns overwrite earlier ones. Rename duplicate headers in the source CSV first, or turn headers off and handle position-based access.

Yes. The CSV is sent to our server so the JSON can be generated. It is not stored and it is not added to the page link.

Related Tools

Tool available in other languages