Developer Tools

Free CSV to JSON Converter

Paste CSV or TSV and get clean, structured JSON instantly. Auto-detects the delimiter, infers numbers and booleans, handles quoted fields — all in your browser.

Instant Convert 100% Private Auto-Detect Delimiter Type Inference

Input CSV

Drop a CSV file here
or click to browse — accepts .csv, .tsv, .txt
0 chars · 0 lines Empty
Supported: comma, semicolon, tab and pipe delimiters (auto-detected). RFC 4180 quoting — quoted fields may contain delimiters, line breaks and doubled quotes.

JSON Output

JSON will appear here once you paste CSV

What Is CSV to JSON Conversion?

CSV (Comma-Separated Values) is a flat, two-dimensional format — rows and columns, nothing more. JSON (JavaScript Object Notation) is a hierarchical format that can represent nested structures, arrays, and rich types like numbers and booleans.

Converting CSV to JSON is a standard step when moving data between worlds: from a spreadsheet into a web application, from a database export into an API, from an analytics tool into a modern frontend.

The basic shape

Each CSV row becomes a JSON object. Each column header becomes an object key:

name,age,city
Alice,30,New York
Bob,25,London

Becomes:

[
  { "name": "Alice", "age": 30, "city": "New York" },
  { "name": "Bob",   "age": 25, "city": "London" }
]

Note that 30 and 25 are JSON numbers, not strings — the type inference detected them automatically.

RFC 4180 — the CSV standard

CSV looks trivial until you hit real data. The RFC 4180 standard defines the rules that make it parseable:

RuleExample
Fields containing the delimiter are wrapped in quotes"Hello, world"
Fields containing quotes double the internal quotes"He said ""hi"""
Fields containing newlines are wrapped in quotes"Line 1\nLine 2"
Line endings may be CRLF (Windows) or LF (Unix)Both accepted
A trailing empty field is preserveda,b, = 3 fields

The parser in this tool implements the full standard. It does not use regex or naive `split(',')` — it walks the input character by character, tracking whether it's inside a quoted field, handling escapes, and correctly distinguishing a delimiter inside a quote from a delimiter outside one.

Delimiter auto-detection

CSV files come in several flavours:

DelimiterCommon in
Comma ( , )US/UK Excel, Google Sheets, standard CSV
Semicolon ( ; )European Excel (Germany, France, Spain, Italy)
Tab ( ⇥ )TSV, database exports, log files
Pipe ( | )Data containing both commas and semicolons

The auto-detector tries each candidate on the first few lines, counts how consistently it produces the same number of columns, and picks the best. If it's wrong, you can override manually.

Type inference — number, boolean, null

CSV stores every value as a string. But "30" and 30 are meaningfully different in JSON — the first is a text value, the second is a number you can do arithmetic on. Type inference converts cells that clearly look like JSON types:

Cell valueConverted to
true / falseboolean
nullnull
0, 42, -17integer
3.14, -0.5float
1e10, 2.5e-3scientific notation
007string (leading zeros preserved)
1,000string (ambiguous — thousands separator?)
hellostring

The rules are conservative: only unambiguous matches are converted. Anything ambiguous — leading zeros, thousands separators, trailing dots — stays as a string. You can turn off type inference entirely if you need every cell as a string.

Array of objects vs array of arrays

Two output shapes are common, and different consumers want different ones:

// Array of objects — the standard for APIs and databases
[
  { "name": "Alice", "age": 30 },
  { "name": "Bob",   "age": 25 }
]

// Array of arrays — preserves the raw tabular shape
[
  ["name", "age"],
  ["Alice", 30],
  ["Bob", 25]
]

Array of objects is what nearly every API and database expects. Array of arrays is useful when column names are unknown, when you're feeding data into a spreadsheet engine, or when you want the smallest possible JSON output.

Common use cases

Import into Databases

Convert spreadsheet exports to JSON before importing into MongoDB or Firebase.

Seed Data

Turn CSV of test data into JSON fixtures for unit tests.

Charting Libraries

Feed CSV data into D3, Chart.js or Recharts which prefer JSON.

API Payloads

Convert spreadsheet data into JSON for POST requests.

Data Migration

Move records between systems that speak different formats.

Team Handoffs

Give developers data from non-technical teams in a format they can use.

Automation

Parse CSV inputs in serverless functions and Node scripts.

Config Files

Convert CSV lists into JSON config for static site generators.

Handling edge cases

Privacy and security

This CSV to JSON converter runs entirely in your browser. Parsing, type inference, JSON serialisation and download all happen locally. Your CSV never leaves your device — safe for customer records, financial data, internal exports and any other sensitive content.

Frequently Asked Questions

What is CSV to JSON conversion?
CSV to JSON conversion takes tabular data (rows and columns) and turns it into JSON, which represents the same data as an array of objects. Each CSV row becomes a JSON object, and each column header becomes an object key. This is a common step when importing spreadsheet data into a web application or database.
What is the difference between CSV and JSON?
CSV is a flat, two-dimensional format — every row has the same columns, and there's no way to represent nested data. JSON is hierarchical, so it can represent arbitrary nesting, arrays within objects, and complex types like booleans and numbers. JSON is what APIs and modern applications speak.
How are quoted fields handled?
The converter follows RFC 4180. Fields wrapped in double quotes may contain delimiters, line breaks, and doubled double-quotes (which become single quotes). This means a value like "Hello, world" is correctly parsed as a single field even though it contains a comma.
How does delimiter auto-detection work?
The converter scans the first few lines of the CSV, trying each common delimiter (comma, semicolon, tab, pipe) and counting how consistently it produces the same number of columns per row. The delimiter with the most consistent field count wins. You can always override it manually.
What does type inference do?
With Detect types on, cells that look like numbers become JSON numbers, cells that are exactly true or false become JSON booleans, and cells that are exactly null become JSON null. Cells that don't match any of these stay as strings. This produces cleaner JSON that's ready to use in code without string-to-number conversions.
What is the difference between array of objects and array of arrays?
Array of objects is the standard JSON structure: [{"name":"Alice","age":30},…]. Array of arrays preserves the raw tabular shape: [["name","age"],["Alice",30],…]. Array of objects is what most APIs and databases want; array of arrays is useful for compact datasets or when column names are unknown.
Why is my CSV not converting correctly?
The most common cause is a mismatched delimiter — a semicolon-separated file read as comma-separated produces one column with the entire row as a value. The auto-detect usually handles this, but if you know the delimiter, set it manually. Other issues: unbalanced double quotes, a BOM character at the start of the file, or a header row with duplicate column names.
How are duplicate column names handled?
Duplicate headers get a numeric suffix — a second column called name becomes name_2, a third becomes name_3, and so on. Empty headers are filled with col_1, col_2 based on their position. This ensures every key in the resulting JSON is unique.
Is my CSV uploaded to a server?
No. All conversion happens locally in your browser. Your CSV never leaves your device. Safe for customer records, financial exports, internal data dumps and any other sensitive content.
Is this CSV to JSON converter free?
Yes. It is 100% free, requires no sign-up, and runs entirely in your browser. No limits, no watermarks, no premium tier.

Related Developer Tools

Done!