CSV to JSON — Convert Spreadsheets to JSON Online

🔒 Runs in your browser — nothing is sent to a server

CSV to JSON converts any CSV spreadsheet — comma, semicolon, tab or pipe-delimited — into a clean JSON array of objects in one click. Paste an Excel export, a Google Sheets download, a database dump or a hand-written CSV, and this CSV to JSON converter parses the source with the streaming Papa Parse library, treats the first row as keys (toggle off if not), trims whitespace, auto-types numbers and booleans, and emits pretty-printed JSON ready for an API call, a fixture file or a config import. Quoted fields, embedded commas and escaped quotes are handled correctly. Everything runs 100% inside your browser; your CSV never leaves your device, nothing is uploaded, logged or sent to any server.

Two-pane view: input and output side by side
Copied!

When to use a CSV to JSON converter online

You reach for a CSV to JSON converter any time tabular data needs to flow into a JSON-native pipeline: seeding a fixture file for a Jest or Vitest suite, posting a row batch to a REST endpoint that accepts JSON, importing a Google Sheets export into a config file, transforming a database dump for a NoSQL store, or just inspecting a CSV in a structured form before writing the parsing code yourself. Browser-local conversion matters when the spreadsheet contains customer emails, payroll figures, internal report definitions or any data you would rather not paste into a remote SaaS converter.

How CSV to JSON conversion works under the hood

CSV to JSON conversion is a parse-then-emit pipeline. The Papa Parse tokenizer reads the CSV character by character, recognising the delimiter (or sniffing it when set to Auto), respecting double-quoted fields, line breaks inside quotes and the `""` escape for a literal quote. The first row is held as the header when the option is on; each subsequent row maps its values by position to the header keys, building one JavaScript object per row. Auto-typing runs each cell through a numeric and boolean check so `42` becomes the JSON number `42` and `true` becomes the boolean `true`. The resulting array is serialised with `JSON.stringify(value, null, 2)` — two-space indented, line-broken, ready to copy into a fixture file or paste into Postman. The whole pipeline runs inside the browser engine, so a thousand-row spreadsheet converts in milliseconds without leaving your tab.

Examples

Input
name,age,active
Alice,30,true
Bob,25,false
Charlie,42,true
Output
[
  {
    "name": "Alice",
    "age": 30,
    "active": true
  },
  {
    "name": "Bob",
    "age": 25,
    "active": false
  },
  {
    "name": "Charlie",
    "age": 42,
    "active": true
  }
]
CSV to JSON — typical export with header row
Input
sku;product;price_eur
FC-001;Widget;9,99
FC-002;Gadget;24,50
Output
[
  {
    "sku": "FC-001",
    "product": "Widget",
    "price_eur": "9,99"
  },
  {
    "sku": "FC-002",
    "product": "Gadget",
    "price_eur": "24,50"
  }
]
Convert CSV to JSON — semicolon-delimited European spreadsheet
Input
tool,role
csv to json,convert spreadsheet rows to JSON objects
csv to json converter online,browser-local with no upload
Output
[
  {
    "tool": "csv to json",
    "role": "convert spreadsheet rows to JSON objects"
  },
  {
    "tool": "csv to json converter online",
    "role": "browser-local with no upload"
  }
]
CSV parser to JSON — payload that names the tool itself
Input
id,address,note
1,"123 Main St, Apt 4","first order"
2,"55 King St","contains, comma"
Output
[
  {
    "id": 1,
    "address": "123 Main St, Apt 4",
    "note": "first order"
  },
  {
    "id": 2,
    "address": "55 King St",
    "note": "contains, comma"
  }
]
CSV to JSON array — quoted fields with embedded commas preserved

FAQ

How do I convert a CSV file to JSON?

Paste the CSV (or open the file in a text editor and copy the content) into the input above and click Convert to JSON. The converter parses the source with the Papa Parse library, treats the first row as the JSON keys by default, trims whitespace, auto-types numbers and booleans, and emits a pretty-printed JSON array of objects ready to consume.

What CSV format is supported?

Comma-, semicolon-, tab- and pipe-delimited CSV — pick the delimiter from the toggle row or leave Auto for the parser to detect it. Standard CSV escaping is supported: fields wrapped in double quotes preserve embedded commas, line breaks and the literal `""` escape for an inner quote. The format covers Excel exports, Google Sheets downloads and most database dumps without any preprocessing.

How does the CSV to JSON converter handle the header row?

When "First row is header" is on (default), the parser uses the first row as the JSON keys and emits one object per data row. With it off, every row becomes an array of values and the output is an array of arrays. Toggle it off when the CSV has no header — for example a denormalised data dump where every row is just values.

Will the CSV parser preserve quoted fields and embedded commas?

Yes. Fields wrapped in double quotes preserve any commas, semicolons, tabs, line breaks and the escape sequence `""` (literal double quote) inside them. This is the RFC 4180 standard for CSV. The Papa Parse library implements RFC 4180 plus the common dialect quirks (Excel-style line endings, UTF-8 BOM, inconsistent row lengths), so most real-world CSV exports parse without manual cleanup.

What does the "Auto-type values" option do?

Auto-type runs each cell through a numeric and boolean check: `42` becomes the JSON number `42`, `3.14` becomes `3.14`, `true` and `false` become booleans, empty strings become `null`. With it off, every value stays a string. Turn it off when your data contains things that look like numbers but should stay strings — phone numbers, ZIP codes, SKUs with leading zeros.

How is CSV to JSON different from JSON to CSV?

CSV to JSON and JSON to CSV are inverse operations. CSV to JSON parses a row-oriented spreadsheet into a JSON array of objects, ready for API calls and JavaScript consumption. JSON to CSV flattens a JSON array of objects back into rows for Excel, Google Sheets or a database COPY/IMPORT command. Both use Papa Parse under the hood and round-trip cleanly when the JSON is a flat array of objects.

Why are my numbers showing as strings instead of numbers?

Auto-type only converts a value when it parses cleanly as a number or boolean. European-style decimals with a comma (`9,99`) stay strings because `9,99` is not a valid JSON number — convert the decimal separator first (or pick semicolon delimiter if `9,99` is the value rather than two columns). Phone numbers, ZIP codes with leading zeros and SKUs that happen to be all digits also intentionally stay strings.

Is it safe to paste a CSV with sensitive data into this online CSV to JSON converter?

Yes — the CSV to JSON converter runs entirely in your browser via the Papa Parse library bundled into the page. Your CSV and the JSON output stay on your machine; nothing is uploaded, logged or cached. Safe for customer exports, internal admin reports, payroll dumps and any spreadsheet you would not want a remote SaaS converter to retain.

Glossary

CSV (Comma-Separated Values)

CSV is a simple text format where each line is a row and each row holds fields separated by a delimiter — usually a comma, sometimes a semicolon (European locale) or tab. Defined informally for decades and loosely standardised by RFC 4180. CSV is the lingua franca for tabular data exchange between spreadsheets, databases, BI tools and ETL pipelines.

JSON (JavaScript Object Notation)

JSON is a lightweight, text-based data format that represents structured data as nested objects, arrays, strings, numbers, booleans and null. Defined by RFC 8259 and ECMA-404, JSON is the de-facto wire format for HTTP APIs, configuration files, package manifests and IPC. Converting CSV to JSON gives every row a self-describing shape with named keys.

CSV header row

The header row is the first line of a CSV file and lists the column names — for example `name,age,active`. A CSV-to-JSON converter uses the header to assign JSON keys to each value in the data rows. CSV files without a header still parse: every row becomes an array of values instead of an object with named keys.

Delimiter

The delimiter is the character that separates fields within a CSV row. Comma is the default in US/UK locales; semicolon is standard in European locales (because comma is the decimal separator); tab and pipe appear in machine-generated exports. A CSV parser must know the right delimiter — auto-detection sniffs the first few rows and picks the most consistent character.

Quoted field

A quoted field is a CSV value wrapped in double quotes — `"123 Main St, Apt 4"`. Quoting lets a field contain the delimiter, line breaks or the literal double-quote character (escaped as `""`). RFC 4180 defines the quoting rules; modern CSV parsers (Papa Parse, Python `csv` module, .NET `CsvHelper`) implement them faithfully.

Papa Parse

Papa Parse is the de-facto JavaScript CSV parser — streaming, RFC 4180-compliant, with header detection, dynamic typing, custom delimiters and worker-thread support. It powers the CSV import in countless web apps, including this converter. Browser-local Papa Parse means the CSV never leaves the page, which matters for spreadsheets containing customer or payroll data.

Related tools