CSV to JSON Converter

Convert CSV to JSON with automatic delimiter detection.

Your spreadsheet data never leaves this tab

Convert a CSV file to JSON online

Example loaded — edit it or clear it

About this CSV to JSON converter

Paste CSV data (or the contents of a .csv file) and get JSON back — either an array of objects using the first row as keys, or an array of arrays. The parser handles quoted fields, embedded commas, and escaped quotes correctly, and it auto-detects comma, semicolon, tab, or pipe delimiters. You can also set the delimiter yourself when detection guesses wrong.

Because conversion happens in your browser, this is safe for exports containing real data — financial reports, customer lists, database dumps. Nothing is uploaded.

CSV does have a specification, RFC 4180, even though almost nothing follows it to the letter. The rules that actually matter are the quoting rules. A field that contains the delimiter, a double quote, or a line break must be wrapped in double quotes, and a double quote inside a quoted field is escaped by doubling it: She said "hi" is written "She said ""hi""". Records are separated by CRLF, the last one may or may not end with a line break, spaces count as part of the field, and the header row is optional. The spec registers the media type text/csv with US-ASCII as the default character set, which is a large part of why encoding is the number one real-world CSV problem.

Some honest notes on what this converter does. Every value comes out as a JSON string — "34", not 34 — because CSV carries no type information, and guessing is exactly how leading zeros in zip codes, phone numbers, and part codes get destroyed. Cast the columns you need on the other side. Duplicate column names collapse to the last one, since JSON objects cannot hold two identical keys. Rows with fewer fields than the header are padded with empty strings; fields past the end of the header are dropped. Completely blank lines are skipped. And auto-detection only looks at the first line and counts characters without respecting quotes, so a header like "Apellido, Nombre";Edad can fool it into picking the comma — if the output looks wrong, set the delimiter manually. If your first key comes out with an invisible character in front of it, the source file started with a UTF-8 byte order mark (EF BB BF); delete that first character.

Where this page stops being the right tool: files in the hundreds of megabytes, since everything runs in the tab; anything needing typed or streamed output; and messy real-world CSV with ragged rows you want reported rather than silently padded. For those, Python’s csv module, DuckDB’s read_csv, or a dedicated library will serve you better. For the everyday job — a spreadsheet export you need as JSON for an API call, a fixture, or a quick sanity check — pasting it here is faster than writing the script.

CSV quoting rules and delimiters, from RFC 4180

Almost every CSV bug is a quoting bug, because a naive split on the delimiter cannot know whether a comma is a separator or part of a name. These are the rules a correct parser follows.

The value you meanHow it must be writtenWhy
AnaAnaNo delimiter, quote or line break, so quoting is optional.
Ana, Luis"Ana, Luis"Contains the delimiter, so the field must be quoted.
She said "hi""She said ""hi"""A double quote inside a quoted field is escaped by doubling it.
Two lines in one cell"line one⏎line two"A CRLF is only legal inside a field when the field is quoted.
spaced spaced or " spaced "Spaces are part of the field and must not be trimmed by the parser.
(empty)nothing, or ""Both parse as an empty string. CSV has no way to distinguish empty from NULL.
C:\path\fileC:\path\fileBackslash is not an escape character in CSV. Only the doubled quote is.

The delimiter itself is the other half of the problem. RFC 4180 only defines the comma; everything else is convention, which is why a file can be perfectly valid and still open as one column.

DelimiterWhere you meet itNote
, commaRFC 4180, most APIs, Excel on US/UK systemsThe only delimiter the specification actually defines.
; semicolonExcel on Spanish, French, German and Portuguese systemsComma is the decimal separator in those locales, so the list separator becomes a semicolon.
Tab (TSV)Database exports, PostgreSQL COPY, pasting out of ExcelTabs almost never appear in cell values, so quoting is rarely needed.
| pipeWarehouse and Hive-style extractsChosen precisely because it almost never occurs in real data.

Encoding is the other classic failure. Excel opens a .csv with the system code page unless the file starts with a UTF-8 byte order mark (the bytes EF BB BF), which is what the "CSV UTF-8 (Comma delimited)" save format writes. Without it, accented characters arrive mangled. Microsoft’s own recommendation is not to double-click the file at all:

  1. In Excel, go to Data > Get Data > From File > From Text/CSV instead of opening the file directly.
  2. In the preview dialog, set File Origin to UTF-8 (listed as "65001: Unicode (UTF-8)").
  3. Set Delimiter to the character the file actually uses — comma, semicolon or tab.
  4. Check the preview grid, then Load.

There is also a widely supported Excel shortcut: put sep=; on its very first line and Excel will use that delimiter and hide the line. It is an Excel extension, not part of RFC 4180 — every other parser, including the one on this page, will read sep=; as an ordinary first row of data. Use it for files that only Excel will ever open, and strip it before sending the file anywhere else.

FAQ

Does it support semicolon-separated files?

Yes. The delimiter is auto-detected (comma, semicolon, tab, or pipe), and you can override it manually.

How are the JSON keys chosen?

With "First row is header" enabled, column names from the first row become the object keys. Disable it to get plain arrays instead.

Is there a file size limit?

Only your browser’s memory. Files in the tens of megabytes work fine on a typical machine.

Related tools