RFC 4180 · Delimiter Auto-Detection · Live Table Preview
CSV to JSON Converter
Convert comma-separated data, TSV exports, and database dumps into structured JSON arrays and back. Inspect results in a live searchable preview table.
Presets:
CSV Delimiter
506 characters
Interactive Data Preview (8 rows)
Live tabular preview of structured columns
| id | name | role | department | salary | active |
|---|---|---|---|---|---|
| 101 | Smith, Dr. Sarah | Lead Architect | Infrastructure | 145000 | true |
| 102 | Marcus Vance | Senior Engineer | Frontend | 128000 | true |
| 103 | Elena Rostova | Product Designer | UX | 115000 | false |
| 104 | David Kim | Security Specialist | SecOps, Cloud | 138000 | true |
| 105 | Chloe Bennett | DevOps Specialist | Platform | 122000 | true |
Page 1 of 2
RFC 4180 Specifications, Serialization Tradeoffs & Common Pitfalls
The RFC 4180 Standard Rules
Many developers attempt naive CSV parsing using line.split(','), which invariably fails in production. RFC 4180 defines the authoritative standard:
- Embedded Commas: If a field value contains a comma or newline, the entire field must be enclosed in double quotes (e.g.
"Smith, Dr. Sarah"). - Escaped Double Quotes: If double quotes appear inside a field, they must be escaped by preceding them with another double quote (e.g.
"He said ""Hello"""). - Record Endings: Standard records terminate with CRLF (
\r\n), though modern Unix tools frequently use LF (\n). Robust parsers must support both.
CSV vs. JSON Serialization Tradeoffs
Selecting between flat tabular formats and hierarchical serialization depends on your system architecture:
- CSV Bandwidth Efficiency: CSV repeats headers only once at the top of the file, making large flat tabular datasets (millions of rows) up to 70% smaller than JSON, which repeats key strings for every single record object.
- JSON Expressiveness: JSON natively represents typed values (booleans, integers, floats, nulls) and nested trees (arrays of objects). Flattening deep nested trees into CSV requires artificial dot notation (e.g.
user.address.street).
Data Type Inference and Localization
In continental Europe, Excel exports use semicolons (;) as column separators because commas serve as the decimal mark (e.g., 14,50 €). Our converter automatically detects semicolons and tabs, and converts string literals like "true" or "128000" to native JavaScript booleans and numbers when requested.