CSV to JSON Converter Privacy: All processing runs locally
Convert CSV, TSV, or delimited text to JSON. Supports custom delimiters, quoted fields, type inference, nested JSON, and multiple output formats.
How It Works
CSV Parsing and Quoted Fields
CSV (Comma-Separated Values) is a simple text format for tabular data. Each row is a line, and fields are separated by a delimiter character. When a field contains the delimiter, line breaks, or quote characters, it must be enclosed in quotes. Escaped quotes inside quoted fields are represented by doubling the quote character: "she said ""hello""".
Delimiters: Comma, Semicolon, Tab, Pipe, Custom
This tool auto-detects whether your data uses commas, semicolons, tabs, or pipes by analyzing the first few rows. You can also override the delimiter manually. Custom single-character delimiters are supported for formats like tilde-separated or colon-separated data. Auto-detection can fail on very small or irregular samples β manual override helps in those cases.
Headers and Generated Column Names
By default, the first row is used as JSON object keys. If your data has no header row, select "No header row" and column names like column1, column2 will be generated automatically. You can also type custom headers. Duplicate or empty headers are detected and can be deduplicated automatically.
Type Inference and When to Keep Strings
In "Safe" mode, obvious numbers (like 42 or 3.14), booleans (true/false), and null are converted to their JSON types. Values with leading zeros (like ZIP codes 08001 or IDs 00123) are preserved as strings to avoid data loss. Large integers beyond JavaScript's safe integer limit are also preserved. Set type inference to "Off" to keep every value as a string.
Nested JSON from Dotted Headers
Enable "Build nested JSON" to transform headers like user.name and user.email into nested objects:
{ "user": { "name": "Alice", "email": "alice@example.com" } }
Bracket notation like user[name] is also supported. If a conflict occurs (e.g., both user and user.name exist), a warning is shown.
JSON Output Formats
Array of Objects is the default β each row becomes a JSON object with headers as keys. Array of Arrays includes headers as the first sub-array. Object Keyed by Column uses a selected column's values as object keys. JSON Lines (NDJSON) outputs one JSON object per line β useful for log processing, streaming, and database imports. Column Arrays groups all values for each column into an array.
CSV to JSON vs JSON to CSV
This tool converts CSV β JSON. To go the other way (JSON β CSV), use the JSON to CSV converter. The "Swap" button opens the JSON to CSV tool directly.
Privacy and Local Processing
All parsing and conversion runs entirely in your browser using JavaScript. Your CSV data, file contents, headers, and output are never sent to any server. No data is stored in cookies, localStorage, or any remote service. You can verify this by checking the Network tab in your browser's DevTools β there are zero requests during conversion.
Frequently Asked Questions
Is my CSV uploaded?
Can I convert TSV to JSON?
What if my CSV uses semicolons?
How are quoted commas handled?
"value with , comma" as a single field.Can I keep all values as strings?
How do I create nested JSON?
user.name or address.city will create nested objects. Bracket notation like user[name] also works.What happens with duplicate headers?
name, name_2, name_3. You can disable deduplication in Parsing Options. In strict mode, duplicate headers cause an error.What is JSON Lines (NDJSON)?
Why did my ZIP code lose a leading zero?
08001) are preserved as strings. If you're using "Aggressive" mode, try switching to "Safe" or "Off". Leading zeros are a strong signal that the value is an identifier, not a number.