CSV to JSON
Convert CSV data to JSON format with customizable options.
How the Conversion Works
When the header option is on, the first row becomes the property names. Every row after that becomes a JSON object. A CSV with 100 data rows and 5 columns becomes a JSON array with 100 objects.
If your CSV has no header row, turn the header option off. The converter will return an array of arrays instead. That is often better for raw exports, logs and quick data checks.
Supported Formats
- CSV - Comma-separated data from spreadsheets, databases and reports.
- TSV - Tab-separated data copied from spreadsheets or database tools.
- Semicolon CSV - Common in regions where commas are used as decimal separators.
- Quoted fields - Double-quoted fields can contain delimiters inside the value.
Common Conversion Problems
Most CSV-to-JSON headaches come from a few predictable issues:
- Wrong delimiter - If your file uses semicolons but comma is selected, each row may collapse into one field.
- Encoding issues - CSV files saved in older encodings can show strange characters. Re-save as UTF-8 if accents or symbols look broken.
- Inconsistent columns - Rows with missing values will produce empty fields. Rows with extra values should be checked before use.
- Data types - The converter detects simple numbers, booleans and null values. Dates and mixed formats still need review in your app.
When to Use a Local Tool Instead
For very large files or sensitive data, convert locally. Python, Node.js and spreadsheet tools can handle big files without pasting private data into a browser page.
How to Use
- Paste your CSV data into the input area.
- Pick comma, tab or semicolon as the delimiter.
- Choose whether the first row is a header.
- Copy the JSON output.
Frequently Asked Questions
Does the first row need to be headers?
By default, yes. The first row provides the property names for each JSON object. If your CSV doesn't have headers, you can toggle this off and get an array of arrays instead.
Can it handle fields with commas inside them?
Quoted fields handle that. As long as the field is wrapped in double quotes, the parser reads the comma as data instead of a delimiter - standard RFC 4180 behavior.
What about tab-separated (TSV) data?
Just select "Tab" as the delimiter. TSV files are common when exporting from databases or copying data from spreadsheets. The conversion works exactly the same way.
Why did some values become numbers or booleans?
The converter detects simple values like 42, true, false and null so the JSON is more useful right away. If a value should stay as text, review it after conversion.
My output has weird characters. What happened?
This is almost always an encoding problem. Your CSV file is probably saved in Windows-1252 or ISO-8859-1 instead of UTF-8. Open the file in a text editor, re-save it as UTF-8 and try the conversion again.