Skip to content
Data & NetSuite utilities

CSV to JSON converter — quoted fields handled properly

Convert CSV to a JSON array of objects in your browser. Quoted fields, any delimiter, optional header row, type coercion, and ragged-row warnings.

Free · no signup · runs in your browserUpdated
Short answer

To convert CSV to JSON, treat the first row as keys and turn each following row into one object. A file with 6 columns and 3 data rows becomes a JSON array of 3 objects. Quoted fields keep embedded commas and doubled quotes intact; type coercion turns 4800 into a number and true into a boolean.

Every ERP export is a CSV and every API wants JSON, so CSV to JSON is the conversion you end up doing by hand at 6pm. The awkward part is never the shape — it is the one customer called Acme Industrial, Inc. whose comma splits a row in two, or the note field containing a doubled quote.

This converter reads CSV the way the spec says to: a quoted field can hold the delimiter, a line break, or a doubled quote, and it survives all three. Pick your delimiter, say whether the first row is a header, and decide whether numbers should stay strings.

It also tells you when something is wrong instead of quietly losing data. Rows with the wrong number of fields are counted and padded, never truncated, and an unterminated quote is reported rather than swallowing the rest of the file in silence.

Quoted fields may contain the delimiter, line breaks and doubled quotes (""). CRLF, LF and a leading byte-order mark are all handled. Runs in your browser — nothing is uploaded.

European exports and German Excel usually mean semicolon.

First row
Coerce types
JSON style
JSON output
[
  {
    "customer": "Acme Industrial, Inc.",
    "item": "WIDGET-100",
    "qty": 120,
    "unit_price": 14.5,
    "ship_date": "2026-07-14",
    "notes": "Net 30; \"priority\" account"
  },
  {
    "customer": "Baltic Fasteners",
    "item": "BOLT-M8",
    "qty": 4800,
    "unit_price": 0.42,
    "ship_date": "2026-07-15",
    "notes": ""
  },
  {
    "customer": "Northwind Traders",
    "item": "PUMP-3X",
    "qty": 12,
    "unit_price": 865,
    "ship_date": "2026-07-16",
    "notes": "Partial backorder"
  }
]
Objects produced3
Columns6
Ragged rows0
Blank lines skipped0
Output characters520
3 objects across 6 columns, every row the same width. Numbers, true/false and null are converted; values with leading zeros stay strings so item codes survive.

Everything is computed in your browser. Nothing you type is sent anywhere or stored.

What the CSV to JSON parser does with messy input

InputHandling
A quoted field containing the delimiter — "Acme Industrial, Inc."Stays one field. The quotes are removed from the value.
A doubled quote inside a quoted fieldBecomes one literal double quote in the JSON string.
A line break inside a quoted fieldKept inside the value; the row does not end there.
CRLF or LF line endings, mixedBoth accepted, either way round.
A byte-order mark at the start of the fileStripped, so the first key is not prefixed with an invisible character.
Blank lines anywhere in the fileSkipped and counted, so a stray newline never produces an empty object.
A row with more fields than the headerExtra values are kept under generated keys and the row is flagged as ragged.
A row with fewer fields than the headerMissing keys are added as empty strings, and the row is flagged.
An unterminated quoteReported explicitly — this is the failure that silently merges the rest of the file into one value.
Parser behaviour, field by field.

Type coercion is convenient and occasionally destructive

With coercion on, 4800 becomes the number 4800, true becomes a boolean, and null becomes null. That is what you want for quantities and amounts feeding a chart or an API. It is exactly what you do not want for identifiers.

  • Leading zeros are preserved. An item code of 0012345 stays a string, because 12345 is a different item.
  • Oversized integers stay strings. An 18-digit SSCC pallet label is past the point where JavaScript can hold an integer exactly, so it is left alone rather than quietly rounded.
  • Dates are left as strings. 2026-07-14 is unambiguous as text and becomes ambiguous the moment anything parses it in a local timezone.
  • Empty fields become empty strings, not null. An empty cell tells you nothing about whether the value is absent or genuinely blank.

Ragged rows are a signal, not a nuisance

When the field count varies, something upstream wrote a delimiter into a value without quoting it. Address fields and free-text notes are the usual culprits. This converter keeps the extra values under generated keys so you can see what leaked, which is faster than diffing row counts after the fact.

Going the other way — an API payload that has to land in a spreadsheet — use the JSON to CSV converter. If the CSV came out of a saved search that took three attempts to get right, the SuiteQL formatter makes the query behind it readable.

Nothing leaves your browser

The parser is a few hundred lines of JavaScript running on this page. There is no upload, no request, no temporary file on a server, which is the only reason it is reasonable to paste a customer list into a web page at all. Check the network tab if you would rather verify than trust.

Frequently asked questions

How do I convert CSV to JSON?

Take the header row as your keys, then map each following row into an object by pairing each field with the key in the same position. The result is a JSON array of objects. The part that needs care is quoted fields: a value wrapped in double quotes may contain the delimiter, line breaks, or doubled quotes.

How are CSV fields with commas inside them handled?

A field wrapped in double quotes keeps its commas, so "Acme Industrial, Inc." stays one value rather than splitting into two. Inside a quoted field, two consecutive double quotes mean one literal quote character. Line breaks inside quotes are also part of the value, so one record can span several lines.

Should numbers in a CSV become JSON numbers?

Quantities and amounts, yes — downstream code can then do arithmetic without parsing. Identifiers, no. Item codes, account numbers, phone numbers and barcodes look numeric but are strings: converting them drops leading zeros and can round long values. This tool coerces numbers, booleans and null but leaves anything with a leading zero as a string.

What happens if a row has more fields than the header?

The extra values are kept under generated keys and the row is counted as ragged, rather than being trimmed away. A varying field count almost always means an unquoted delimiter inside a value — a comma in an address or a note — so it is worth fixing at source rather than in the JSON.

What delimiter do European CSV files use?

Usually a semicolon. Where the comma is the decimal separator, Excel writes and expects semicolon-delimited files, and calls them CSV anyway. Tab-delimited files are common from database exports, and pipe-delimited files from older EDI and ERP interfaces. All four are available here.

Is my CSV uploaded anywhere?

No. Parsing happens in your browser with JavaScript on this page — no upload, no server-side processing, no storage. That matters when the file is a customer list or a price book. You can confirm it by opening your browser's network tab while you paste.

All 50 ERP & finance tools

Stop calculating it by hand. Just ask your ERP.

This calculator needs you to find the inputs first. ERPray pulls them from your own ERP account and computes the answer live — with the exact query shown so you can check it.