CSV to JSON and JSON to CSV Converter

Convert CSV to JSON and JSON to CSV in your browser. Auto-detects commas, semicolons, tabs and pipes, converts numbers and true/false, can nest a.b columns into objects, and never uploads your data.

  • Free
  • No upload
  • No signup
  • Works offline

Your files never leave your device

How to use CSV ⇄ JSON

  1. 1Choose the direction

    Select CSV → JSON or JSON → CSV.

  2. 2Paste or open your data

    Paste data into Input or drop a .csv or .json file.

  3. 3Set the options

    Choose the Delimiter (Detect automatically, Comma, Semicolon, Tab or Pipe) and tick First row is a header, Convert numbers and true/false, Nest "a.b" columns into objects and Pretty print as needed.

  4. 4Copy or download

    The Output updates as you type. Copy it or download it as a file.

Move data between spreadsheets and code

CSV is the universal export format of spreadsheets, CRMs, banks and analytics tools. JSON is what web apps, APIs, JavaScript and NoSQL databases expect. Converting between them by hand is error-prone – quoted commas, line breaks inside cells and different delimiters trip up simple scripts. This CSV to JSON converter handles those details and works both ways.

CSV → JSON

Paste CSV into Input (or drop a file) and the JSON appears in Output. With First row is a header ticked, each row becomes an object whose keys are the column names:

name,age,active
Asha,34,true
Ben,28,false

becomes

[
  { "name": "Asha", "age": 34, "active": true },
  { "name": "Ben", "age": 28, "active": false }
]

Untick the header option for CSV files without a header row – each row becomes an array instead.

JSON → CSV

Choose JSON → CSV and paste an array of objects. Column headers are collected from all objects, so records with missing fields still line up; empty cells are left blank. Values containing commas, quotes or line breaks are quoted correctly, so the file opens cleanly in Excel, Google Sheets and Numbers.

Options explained

Delimiter. Detect automatically looks at your data and picks the separator. Override it with Comma ,, Semicolon ;, Tab or Pipe | when detection guesses wrong – for example in a one-column file. In JSON → CSV mode the delimiter controls the output separator; choose semicolon for European Excel versions, which expect it.

Convert numbers and true/false. Without this, every CSV value is a string – which is what CSV technically contains. With it, numeric values and true/false become proper JSON types. Leave it off for codes where leading zeros matter, such as phone numbers, postcodes and product IDs like 00123.

Nest “a.b” columns into objects. Columns named with dots, like user.name and user.email, are grouped into nested objects. Going the other way, nested JSON is flattened into dotted columns – handy for exporting API responses to a spreadsheet.

Pretty print. Indents the JSON for readability. Untick it for compact output to paste into code or config.

Handling tricky CSV

The parser follows the CSV standard (RFC 4180):

  • Fields in double quotes can contain commas and line breaks.
  • Double quotes inside quoted fields are written as "".
  • Windows (CRLF) and Unix (LF) line endings both work.
  • Blank trailing lines are ignored.

If the output looks wrong – everything in one column, for instance – check the delimiter first.

Common uses

  • Turning a spreadsheet into seed data or fixtures for an app.
  • Preparing product or contact lists for an API import.
  • Converting API JSON into a spreadsheet for analysis.
  • Creating JSON config from a table maintained by non-developers.
  • Converting bank or analytics exports for a script.

For Excel workbooks, start with Excel to CSV, which reads XLSX, XLS and ODS and can also save JSON directly. For XML feeds and SOAP responses, use XML to JSON. To embed small files in JSON, see Base64 Encode / Decode.

Privacy

Data files often contain personal or commercial information. The conversion runs in your browser and nothing is uploaded or stored.

Frequently asked questions

How do I convert CSV to JSON?

Choose CSV → JSON, paste your CSV or open the file, keep First row is a header ticked and copy or download the JSON array of objects.

My CSV uses semicolons. Will that work?

Yes. Detect automatically recognises commas, semicolons, tabs and pipes. You can also choose the delimiter yourself – semicolons are common in European Excel exports.

Why are my numbers strings in the JSON?

Tick Convert numbers and true/false. Values like 42, 3.5 and true then become JSON numbers and booleans instead of text.

How does nesting work?

With Nest "a.b" columns into objects ticked, a column called address.city becomes {"address": {"city": ...}}. In JSON → CSV, nested objects are flattened back into dotted column names.

What if the CSV has no header row?

Untick First row is a header. Each row becomes an array of values instead of an object.

Is my data uploaded?

No. Parsing happens in your browser, so spreadsheets with customer or financial data stay on your device.

Cookie settings

Choose which optional technologies may be used on this browser. Your choice is saved on this device only (in local storage) and is sent to Google using Consent Mode. Files you process are never uploaded, whatever you choose.

Remembers your theme and this consent choice, and lets the site work offline. Always on; nothing is shared.

Lets Google store and read cookies to serve, cap and measure ads, and receive ad-related data about your visit (ad_storage, ad_user_data). If off, Google may still show limited, non-personalised ads without cookies.

Lets ads be tailored to your interests (ad_personalization). Requires Advertising.

Allows privacy-friendly usage statistics (analytics_storage). We do not run analytics today; this stays off unless you allow it.