Worked example: a semicolon export with tricky fields
This stock export from a European spreadsheet uses semicolons, has a product name containing a semicolon, another with quotes, and SKUs with leading zeros. The separator is detected as semicolon, the quoted fields are read whole, the SKUs stay text (“00412”), the price “7,50” stays text because it uses a decimal comma, and the stock.london and stock.leeds columns are nested under stock:
sku;name;price;stock.london;stock.leeds 00412;"Mug; blue";7,50;12;0 00977;"Poster ""Sea""";15;3;8
[
{
"sku": "00412",
"name": "Mug; blue",
"price": "7,50",
"stock": {
"london": 12,
"leeds": 0
}
},
{
"sku": "00977",
"name": "Poster \"Sea\"",
"price": 15,
"stock": {
"london": 3,
"leeds": 8
}
}
]
The CSV rules we follow
- Fields are separated by the delimiter and records by line breaks (\r\n, \n or \r).
- A field may be wrapped in double quotes; inside it, the delimiter and line breaks are ordinary text and "" stands for one quote.
- A field ending in a delimiter at the end of a line gives an empty last value.
- Files that bend the rules are read the way spreadsheets read them, and the summary line tells you what was found, such as a quote that is never closed.
Typing values safely
Converting every number-looking cell to a number seems helpful until a US zip code like 02134 loses its zero or a 16-digit card or account number is rounded, because JSON numbers in most languages are exact only up to 15 digits. The converter keeps those as text. Decimal commas (7,50) also stay text, because 7,50 could be a price or a list of two numbers; convert them in your code if you know the format.
Column names
Empty header cells become column1, column2 and so on, and a name used twice gets _2 on the second copy, so no value overwrites another. If a column is both a value and the parent of others (a and a.b), the clashing column is kept flat under its full name and listed in the summary.
Typical uses
Developers turn spreadsheets into JSON to seed a database, feed a test suite, load product data into an app or call an API with many records at once. Content teams export a sheet of FAQs, store locations or prices and need it in the JSON format a website reads. Because the converter keeps leading zeros and long numbers as text, IDs, phone numbers and postcodes survive the trip intact, and dot-path headers let a flat spreadsheet produce the nested objects an API expects. If a column should stay text even though it looks like a number, untick the typing option and convert the few real numbers in your code instead.
Related tools
- JSON to CSV
- CSV to Excel
- PDF to Excel
- Markdown to Excel
- JSON formatter (on Aultra Tech)
- Remove duplicate lines
Sources
Checked on November 26, 2026:
- RFC 4180: Common format and MIME type for CSV files
- RFC 8259, section 6: numbers and interoperability
- W3C: CSV on the Web primer
Frequently asked questions
How do I convert CSV to JSON?
Does it handle commas and line breaks inside fields?
My file uses semicolons. Does that work?
Are numbers turned into JSON numbers?
How do I get nested JSON from a CSV?
Is my file uploaded?
Last updated: 2026-11-26