Convert CSV to JSON and back with the CSV Converter — quoted fields, delimiter detection, and live output, all in your browser.
The export-to-API pipeline
Most real-world CSV starts in a spreadsheet: a product list, an address book, a translation table. The destination is usually a JSON API, a configuration file, or a database import.
The conversion looks mechanical, but every row that parses wrong becomes a bug downstream. Values with commas, quotes, or newlines are where naive converters fail.
RFC 4180 quoting: the part everyone forgets
CSV quoting is defined by RFC 4180: a field containing a delimiter, a quote, or a line break must be wrapped in double quotes, and quotes inside are doubled.
So `"Ada, Lovelace"` is one field containing Ada, Lovelace, and `"He said ""hi"""` is He said "hi". A field can even contain a literal newline, which is why 'one line per row' is not guaranteed.
A correct converter handles all of this automatically — a regex split on commas does not.
name,note"Ada, Lovelace","line1line2"Delimiters: comma is not universal
Comma is the default, but semicolon-separated exports are common where commas are decimal separators, and tab-separated values appear in many tool exports.
A practical converter detects the delimiter from the first line and lets you override it — because a one-time heuristic is right most of the time, but wrong exactly when the data is unusual.
Headers define the shape
When the first row is headers, each subsequent row becomes an object keyed by those headers. Repeated headers need de-duplication so no key silently overwrites another.
Before converting, check the header row: trailing spaces, empty headers, or duplicate names are the classic sources of subtly wrong JSON.
Warning: Cells that begin with =, +, or - can execute formulas when the converted CSV is opened in a spreadsheet. If the data contains untrusted text, sanitize those cells or warn users.
A conversion workflow that keeps data clean
- Choose CSV to JSON or JSON to CSV.
- Select the delimiter or let the tool detect it from the first line.
- Paste the input and check the row count against the source.
- Review the headers and spot-check rows that contained commas or quotes.
- Copy the output and validate it against the target schema.
FAQ
Q.Why does my CSV have fields with newlines?
A.RFC 4180 allows quoted fields to contain line breaks. A row is a quoted-field sequence, not necessarily a physical line — use a parser that handles quotes, not a line splitter.
Q.Is my data uploaded during conversion?
A.No. Parsing, conversion, and delimiter detection all run in your browser. Your data never leaves your device.
Q.Which delimiter should I use?
A.Match the convention of the system you are importing into. Comma is the most common; semicolon appears in locales where comma is the decimal separator; tab is useful when fields contain commas.
References
This guide follows the CSV specification and related security guidance:
- RFC 4180 – Common Format and MIME Type for CSV Files: https://www.rfc-editor.org/rfc/rfc4180
- RFC 8259 – The JavaScript Object Notation (JSON) Data Interchange Format: https://www.rfc-editor.org/rfc/rfc8259
- OWASP – CSV Injection: https://owasp.org/www-community/attacks/CSV_Injection
Convert your data now
CSV ↔ JSON with quoted fields, delimiter detection, and live output — in your browser.
Clean data is a deliberate act
The difference between a working import and a weekend of debugging is usually quoting and delimiters — invisible until they break.
Convert locally with the CSV Converter, check the row count, and validate the output against your target schema.