Why convert CSV to JSON?
- APIs and web apps — load tabular data straight into JavaScript.
- NoSQL imports — many document databases import JSON.
- Typed data — numbers and booleans become real values instead of text.
How the conversion works
The encoding and delimiter are detected, the CSV is parsed according to RFC 4180, values are typed conservatively, and each row is written as an object keyed by the header row (or as an array).
What is a CSV file?
CSV (comma-separated values) stores a single table as plain text: one row per line, with cells separated by commas (or semicolons or tabs in some regions). Cells that contain commas, quotes or line breaks are wrapped in double quotes.
CSV is the universal exchange format for data — almost every database, spreadsheet, CRM, bank and analytics tool can import and export it. It has no formatting, formulas or multiple sheets, and it does not record its own text encoding, which is why non-English CSV files sometimes open with garbled characters.
What is a JSON file?
JSON (JavaScript Object Notation) is the standard text format for structured data on the web. It represents objects as {"key": value} pairs and lists as [ … ], with strings, numbers, booleans and null as values. APIs, configuration files and NoSQL databases all use it.
Tabular data in JSON is usually a list of objects — one object per row, with column names as keys — or a list of arrays, one per row.