Skip to content
Data helper

CSV ⇔ JSON Converter

Convert JSON and CSV in both directions. A JSON array becomes a CSV table and CSV becomes an array of JSON objects. Choose comma, tab or semicolon as the delimiter, and switch the header row and the JSON indentation (2, 4 or tab). When converting JSON to CSV, the union of keys across all records becomes the columns, so keys present in only some records are not dropped. When converting CSV to JSON, numbers, true / false and null are turned into their types, but values with leading zeros (such as postal codes) and numbers too long to keep their precision stay as strings. Nested objects and arrays are not flattened; they go into a cell as a JSON string. Everything runs in your browser and your data is not sent anywhere. The delimiter can be auto-detected, nested objects can be flattened to a.b columns and restored, formula-like cells can be guarded, JSON Lines is supported, and a table preview warns about rows with a different column count.

Export CSV as SQL or a Markdown table

Uses the CSV in the input box (first row = header). Column types are guessed from the values; numbers with leading zeros stay text.

Guide

How to use & features

  • Select the conversion direction: CSV to JSON or JSON to CSV.
  • Under "Options," specify the delimiter (comma, tab, or semicolon) for your data.
  • Paste your data into the input field to see the conversion results instantly.
  • Click "Copy Output" to grab the converted data for your project.
Samples

Sample input & output

CSV to JSON conversion

Input
id,name,role
1,Alice,Admin
2,Bob,User
Output
[
  {
    "id": "1",
    "name": "Alice",
    "role": "Admin"
  },
  {
    "id": "2",
    "name": "Bob",
    "role": "User"
  }
]

JSON to CSV conversion

Input
[
  {"id": 1, "product": "Widget", "price": 10.5},
  {"id": 2, "product": "Gadget", "price": 20.0}
]
Output
id,product,price
1,Widget,10.5
2,Gadget,20
FAQ

FAQ

  • Which delimiters are supported?

    Comma, tab, semicolon and pipe. Choose Auto-detect and the delimiter is guessed from the first few lines. A checkbox switches whether there is a header row.
  • What happens to value types when converting CSV to JSON?

    Numbers become numbers, `true` / `false` become booleans and `null` becomes null. Values shaped like `{...}` or `[...]` are read as JSON. Without a header row you get an array of arrays.
  • What about values with leading zeros or very long digits?

    Values such as `0123` (postal or invoice numbers) and digit strings that would be rounded as numbers stay as strings, since converting them to numbers cannot be undone.
  • How are columns chosen when converting JSON to CSV?

    The union of keys across all records becomes the columns, so keys present in only some records are kept. Cells for keys a record lacks are empty.
  • What happens to nested objects and arrays?

    At first they are not flattened: they go into the cell as a JSON string such as `{"c":2}`, and converting back to JSON reads that string as JSON again. With Flatten nested objects on, they are split into columns such as `a.b` and `tags.0` and restored to nesting when you convert back.
  • Is my data sent anywhere?

    No. Conversion happens entirely in your browser.
Use cases

Common use cases

  • Viewing API JSON in Excel or a spreadsheet

    Turn JSON returned as an array into CSV to total, sort and share it in a spreadsheet.
  • Turning CSV into test JSON

    Convert test data built in a spreadsheet into JSON for API requests or a mock server.
  • Moving master data between formats

    Pass a master maintained as CSV to an app that loads JSON, or convert the other way.
  • Putting logs and results in a table

    Turn JSON logs into CSV to scan column by column or import into other tools.
Notes

Notes & limitations

  • Nested JSON goes into one cell at first

    Objects and arrays go into one cell as a JSON string. To get separate columns, turn on Flatten nested objects: they become columns such as `a.b` and `tags.0`, and converting back to JSON restores the nesting.
  • CSV to JSON guesses value types

    The string `"true"` becomes a boolean and `"123"` a number. If you want everything kept as strings, check the output and fix it by hand.
  • Wrap JSON in a CSV cell in quotes

    If a cell contains a value with `"`, such as `{"a":1}`, wrap it in double quotes and write each inner `"` as `""`. Otherwise the value breaks.
  • Japanese text can look garbled in Excel

    The output is UTF-8 without a BOM at first. For Excel, turn on Add a BOM when downloading and download the file, or check the encoding when you import it.
About

About this tool

CSV and JSON Converter

CSV and JSON are common data exchange formats, but they serve different workflows. This converter helps turn CSV rows into JSON objects and flatten simple JSON data into CSV for spreadsheets, tests, API fixtures, and quick data handoffs.

Common use cases

  • Create API fixtures: Convert spreadsheet exports into JSON samples for tests or mock servers.
  • Prepare spreadsheet data: Turn simple JSON records into CSV for analysis or sharing.
  • Inspect data shape: Check fields, values, and inferred types before importing data elsewhere.

Conversion note

CSV is flat, while JSON can be nested. Arrays and nested objects need a flattening or serialization convention before they can fit cleanly into columns.

Articles for this tool

Recent Articles