How It Works
The converter reads your CSV input character by character, handling quoted fields (including commas and newlines inside quotes), escaped double-quotes, and configurable delimiters. When the first-row-as-header option is enabled, column names from the first row become JSON object keys. Values are automatically typed: numbers become JSON numbers, "true"/"false" become booleans, and empty cells become null.
Processing happens entirely in your browser. No data is uploaded to any server, so you can safely convert database exports, analytics data, and internal spreadsheets.
CSV Format Reference
| Feature | Syntax | Example |
|---|---|---|
| Basic row | Values separated by delimiter | Alice,30,NY |
| Quoted field | Wrap in double quotes | "Smith, John",25 |
| Escaped quote | Double the quote character | "She said ""hello""" |
| Header row | First row with column names | name,age,city |
| Tab-separated (TSV) | Tab character as delimiter | Paste from Excel or Google Sheets |
| Empty field | Nothing between delimiters | Alice,,NY |
| Newline in field | Quoted field with line break | "Line 1
Line 2" |
CSV vs JSON Comparison
| Aspect | CSV | JSON |
|---|---|---|
| Structure | Flat, tabular rows and columns | Nested objects and arrays |
| Data types | Everything is text | Strings, numbers, booleans, null, arrays, objects |
| File size | Smaller for tabular data | Larger due to key repetition and syntax |
| Readability | Easy for simple tables | Better for nested or complex data |
| Spreadsheet support | Native (Excel, Google Sheets) | Requires parsing or import tool |
| API usage | Rare (some bulk endpoints) | Standard for REST and GraphQL APIs |
| Schema | Implicit from headers | Can be validated with JSON Schema or Zod |
FAQ
How does the tool handle commas inside fields?
Fields containing commas must be wrapped in double quotes following the RFC 4180 standard. The parser correctly identifies quoted fields and treats commas within them as literal characters, not delimiters. For example, "New York, NY" is parsed as a single value.
Can I convert tab-separated data from Excel?
Yes. Select "Tab" from the delimiter dropdown, then paste your data directly from Excel or Google Sheets. Spreadsheet applications copy cells as tab-separated values by default, so the converter will parse them correctly without any modifications.
Does the converter detect data types automatically?
Yes. Numeric values become JSON numbers, "true" and "false" become JSON booleans, and empty cells become null. All other values remain strings. This gives you cleaner JSON output that matches the actual data semantics without manual editing.
What happens with missing or extra columns?
If a row has fewer fields than the header, the missing fields are set to null in the JSON output. Extra fields beyond the header count are still captured in the raw array mode but not assigned a key in object mode. Use the table preview to verify your data before copying.
Need to convert between other formats? YAML to JSON converter or JSON to TypeScript interfaces.