Developer Tools

CSV / JSON Converter

Move tabular data between CSV, spreadsheet selections, and JSON arrays. Quoted delimiters, doubled quotes, and multiline fields are parsed as cells rather than split with a simple comma or line-break rule.

Free online tool

Loading tool…

2 data row(s), 3 column(s). Delimiter: ",".

CSV values stay strings unless inference is enabled. Leading-zero IDs and integers outside JavaScript’s safe integer range stay strings. JSON numeric tokens retain their original digits. Nested JSON values become compact JSON cells; missing properties become empty cells, while null becomes the text null.

Files and pasted data are processed locally. Quoted fields may contain delimiters, escaped quotes, and line breaks. No CSV standard specifies type inference; review inferred types before reuse.

Pasted input and selected files are handled locally. No external conversion service is used.

GET STARTED

How to use the CSV / JSON Converter

  1. 01

    Choose CSV to JSON or JSON to CSV. Paste data or open a UTF-8 file smaller than 2 MB.

  2. 02

    Choose a delimiter and header behavior. CSV import can detect comma, tab, semicolon, or pipe delimiters; selecting one explicitly is more predictable for unusual data.

  3. 03

    Review the output, copy it, or download a file. Reverse this result sends the output into the opposite converter.

Examples

Preserve account numbers

CSV cells such as 00123 and 90071992547409931234 stay strings by default. Even with inference enabled, leading-zero values and integers outside JavaScript’s safe integer range stay strings.

Handle embedded commas and newlines

A field written as "Hello, world" is one cell. A quote inside a quoted field is doubled, as in "Say ""hello""". Line breaks inside quoted fields remain part of the cell.

Convert records with different fields

For [{"a":1},{"b":2}], JSON export creates both a and b columns. Missing properties become empty cells. Nested objects and arrays become compact JSON text inside quoted CSV cells when needed.

Headers and row shape

With headers enabled, CSV becomes an array of objects. Without headers, it becomes an array of arrays. Headers must be nonblank and unique, and each CSV record must contain the same number of fields. Header whitespace is preserved unless trimming is enabled.

Types and numeric precision

CSV has no built-in type system. Inference recognizes exact lowercase true, false, null, and JSON number syntax. Empty cells remain empty strings. Number tokens are written directly to preserve digits; consumers of the resulting JSON may have their own numeric limits. Nonfinite values and unsafe whole numbers remain strings.

Export behavior and formula cells

JSON input must be a nonempty array of objects or arrays. Object columns follow their first appearance; array rows are padded to the widest row. Export uses CRLF record separators and quotes delimiters, quotes, and line breaks. Formula protection prefixes cells beginning with spreadsheet formula characters with an apostrophe, including negative values. Turn it off when you need the original cell text exactly.

What to know

  • Maximum input: 2 million characters. JSON also has a 128-level nesting limit. Duplicate JSON properties are rejected.
  • The file reader expects UTF-8 text. Alternate encodings, Excel workbook files, comments in JSON, and custom multi-character delimiters are unsupported.

Common questions

Can I convert TSV or semicolon-delimited files?

Yes. Choose Tab or Semicolon. Auto-detection is available when importing CSV-like text. A JSON export with the default delimiter uses commas.

Is the conversion lossless in both directions?

No. CSV does not distinguish missing values from empty cells or encode nested types. Nested JSON values export as text and are not automatically reconstructed on reverse import. Inference and formula protection can also change types or cell values.

Why do I get a row field-count error?

A record has more or fewer cells than the first row. Check the selected delimiter and quote cells that contain a delimiter or line break.

Does opening a file upload it?

No. The selected file is read by your browser and converted locally.

Sources & references