CSV to JSON Converter

Convert CSV to JSON and vice versa instantly.

Your text is converted in your browser.

Auto detects comma, semicolon or tab. Choose pipe manually; ambiguous data requires an explicit separator.

By default, the first row contains unique, nonempty column names. Included values stay as text, including spaces and leading zeros.

UTF-8 only, up to 5 MiB per input. You can also drop one file onto the input editor.

Use a nonempty array of flat objects. All columns are included; null and missing fields become empty CSV cells. CSV does not preserve JSON types.

UTF-8 only, up to 5 MiB per input. You can also drop one file onto the input editor.

Convert CSV tables to JSON records and flat JSON records to CSV in your browser. Choose a separator, import UTF-8 files, then copy or download the result.

How to use it

  1. Paste text or select/drop one UTF-8 file, up to 5 MiB.
  2. Choose the separator and, if needed, Minify, Transpose or Skip empty fields.
  3. Convert automatically or press Convert; copy or download the valid result.

How CSV and JSON conversion works

CSV stores a table: one record per row, with fields separated by the chosen character. This tool reads the first row as property names and returns an array of JSON records. It does not guess numbers, dates or booleans.

A worked example

The code 001 remains a string. The comma inside the note belongs to the value because the field is quoted. Doubled quotes become a literal quote.

CSV

name,code,note
Ada,001,"hello, world"
Lin,002,"two ""quotes"""

JSON

[
  {
    "name": "Ada",
    "code": "001",
    "note": "hello, world"
  },
  {
    "name": "Lin",
    "code": "002",
    "note": "two \"quotes\""
  }
]

Separators, quotes and column names

Auto detects comma, semicolon or tab; select pipe manually. Quoted fields can contain separators and line breaks. Every record must match the header width; empty or duplicate names are rejected. Spaces are preserved. CSV output uses CRLF record separators.

CSV → JSON options

  • Minify: Remove JSON indentation without changing values. Turn it off to restore the selected indentation.
  • Transpose: Swap rows and columns before conversion. The first column becomes the header; its names must be unique and nonblank.
  • Skip empty fields: Omit properties whose cell is exactly empty. Spaces, 0 and false text are kept. Records remain; entirely empty columns are excluded from the counts.

Types and limits of the return trip

JSON input must be an array of flat objects. Output includes the union of their keys, even keys appearing in later rows. Numbers retain their original written digits; booleans become text. Null, missing fields and empty strings all become empty cells, so CSV cannot reconstruct their original types. Nested objects and arrays are rejected rather than flattened. A header-only CSV produces [], which cannot carry the original header back.

Spreadsheet warning: CSV cells starting with formula characters may be executed by spreadsheet software. The converter preserves values and does not sanitize formulas. Inspect untrusted files and import suspicious columns as text.

Frequently asked questions

Are imported files sent to a conversion server?

Your text is converted in your browser.

Why is a CSV row rejected?

Choose comma, semicolon, tab or pipe explicitly. Quoted fields can contain separators and line breaks. Every record must match the header width; empty or duplicate names are rejected. Spaces are preserved. CSV output uses CRLF record separators.

Are numbers and JSON types preserved?

JSON input must be an array of flat objects. Output includes the union of their keys, even keys appearing in later rows. Numbers retain their original written digits; booleans become text. Null, missing fields and empty strings all become empty cells, so CSV cannot reconstruct their original types. Nested objects and arrays are rejected rather than flattened. A header-only CSV produces [], which cannot carry the original header back.

What do Minify, Transpose and Skip empty fields do?

Remove JSON indentation without changing values. Turn it off to restore the selected indentation. Swap rows and columns before conversion. The first column becomes the header; its names must be unique and nonblank. Omit properties whose cell is exactly empty. Spaces, 0 and false text are kept. Records remain; entirely empty columns are excluded from the counts.

Recommended Tools