CSV to JSON Converter
Paste CSV and convert each data row to a JSON object. Use the first row as keys or generate column names, choose comma, semicolon, tab or pipe, and leave Types on Text to preserve codes such as 007. Smart converts ordinary numbers, true, false and null; Numbers also converts leading-zero values. Quoted delimiters and line breaks stay inside their cells. Copy or download the full JSON result; the preview shows only the first rows.
The JSON array appears here, one object per row.
Fields are read by RFC 4180, so a quoted field may hold the delimiter, a line break and doubled quotes. every field stays a string, so 007 stays "007".
What happens to an awkward value
- id,user.name 1,Ava
- id,tags 1,"[""a"",""b""]"
- id,email 1,a@b.c 2,
Common questions
- How do I convert a CSV file to JSON online?
- Open the CSV as text and paste its contents into the input pane. Choose the delimiter, header setting and type mode, then copy or download converted.json. Each data row becomes one object inside an array. The page converts pasted text locally; it does not upload files, retrieve remote CSV or supply a programming library.
- How can I preserve leading zeros, IDs and numbers?
- Text keeps every field quoted, including 007, true and null. Smart converts true, false, null and ordinary JSON number spellings but leaves 007 as a string. Numbers also converts 007 to 7. Use Text for identifiers; the software that reads a numeric JSON value can round long numbers even when the exported file contains all their digits.
- What happens without a header row, or with duplicate headers?
- Turn the header row off to use every row as data and generate column1, column2 and so on. With headers on, surrounding whitespace is trimmed and an empty header gets a generated name. Duplicate names receive suffixes such as name_2, with a warning. A row with a different field count is refused rather than silently shifted or shortened.
- Does it convert CSV to nested JSON or JSON Lines?
- The output is an array of flat objects. A header called user.name stays the literal key user.name; it does not create a nested user object. JSON-looking text inside a CSV field remains a string, and arrays are not reconstructed. Nested JSON, DynamoDB attribute types and one-object-per-line JSONL output are not supplied.
- Can I convert TSV or semicolon-separated CSV?
- Yes. Choose Tab, Semicolon or Vertical bar when those separate your cells. A quoted field can contain the chosen delimiter, a line break or doubled quotes. The page may suggest a different delimiter but does not change it automatically. For the other direction, use <a href="/json-to-csv">JSON to CSV</a>.
- Does Download include every row, and how large can the input be?
- Copy and Download include every converted row and each selected column, not just the first rows in the preview. Limits are 5,000,000 characters, 100,000 data rows and 2,000 columns per conversion. Input must fit browser memory; there is no streaming reader or multiple-file batch. Small drafts can be remembered locally; clear them with Start over if needed.
Exact conversion of the records you give it: every key that appears becomes a column, a missing key becomes an empty cell rather than a shifted row, and the CSV is quoted by RFC 4180. Reversing the direction converts types only where you say so.