CSV JSON Converter Tool - CSV to JSON and JSON to CSV Online Converter
First Published:
Last Updated:
Free CSV to JSON and JSON to CSV converter with RFC 4180-compliant parsing, multiple output formats, and smart type inference. All conversion processes are performed entirely within your browser - during the use of this tool, your data never leaves your device or gets uploaded to any server.
IMPORTANT DISCLAIMER:
- This tool is provided "AS IS" without any warranties of any kind.
- The author accepts no responsibility for data loss, conversion errors, or any issues arising from use.
- Very large CSV files may impact browser performance - always verify results.
- Always keep backups of your original data.
- By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Drop a CSV or JSON file here, or
Features
- RFC 4180-Compliant CSV Parser: Correctly handles quoted fields containing commas, embedded newlines, and escaped double-quotes - edge cases that many online converters fail on
- Multiple JSON Output Formats: Choose from Array of Objects, Array of Arrays, Column-Oriented Object, or JSON Lines (NDJSON) to match your specific use case
- Smart Data Type Inference: Automatically detects numbers, booleans, and null values instead of treating everything as strings (can be toggled on/off)
- Dot-Notation Header Expansion: Headers like
user.nameanduser.emailare expanded into nested JSON objects{ "user": { "name": ..., "email": ... } } - Auto-Detect Delimiter: Automatically identifies whether your CSV uses commas, tabs, semicolons, or pipes as delimiters
- Interactive Data Preview: Visual HTML table preview of parsed data with row numbers and color-coded data types
- File Drag & Drop: Load CSV or JSON files by dragging them onto the page, or use the file picker button
- Download Output: Download converted results directly as
.jsonor.csvfiles - Bidirectional Conversion: Convert CSV to JSON and JSON to CSV with full support for nested object flattening
- Client-Side Processing: All operations performed locally in your browser - no data sent to servers
How to Use
- Enter or paste CSV content in the left textarea, or JSON content in the right textarea. Alternatively, drag and drop a
.csvor.jsonfile onto the drop zone. - Adjust conversion options as needed:
- Delimiter: Leave on "Auto-detect" or manually select comma, tab, semicolon, or pipe
- JSON Format: Choose your preferred output format
- First row as header: Uncheck if your CSV has no header row
- Infer data types: Toggle automatic type detection for numbers, booleans, and nulls
- Expand dot-notation: Enable to convert dot-separated headers into nested objects
- Click "CSV to JSON" to convert CSV to your chosen JSON format
- Click "JSON to CSV" to convert JSON arrays or objects back to CSV (nested objects are automatically flattened)
- Use "Copy CSV" or "Copy JSON" to copy results, or "Download" to save as a file
- Review the Data Preview table and statistics bar to verify your conversion
Supported JSON Output Formats
- Array of Objects (default): Each row becomes an object with header keys -
[{"name":"Alice","age":30}, ...] - Array of Arrays: Raw tabular data including header row -
[["name","age"],["Alice",30], ...] - Column-Oriented Object: Data grouped by column -
{"name":["Alice","Bob"],"age":[30,25]} - JSON Lines (NDJSON): One JSON object per line, no wrapping array - ideal for streaming and log processing
RFC 4180 Compliance
- Fields containing commas are enclosed in double-quotes:
"San Francisco, CA" - Fields containing newlines are preserved within double-quotes
- Double-quote characters within fields are escaped as two double-quotes:
"He said ""hello""" - Both CRLF (
\r\n) and LF (\n) line endings are supported
Common Use Cases
- Data Engineering: Convert CSV exports from databases or spreadsheets to JSON for API consumption
- ETL Pipelines: Transform data between CSV and JSON formats for processing pipelines
- API Development: Convert JSON API responses to CSV for spreadsheet analysis
- Log Processing: Use NDJSON format for streaming log data and real-time processing
- Spreadsheet Data: Convert Excel/Google Sheets CSV exports to structured JSON
- Configuration Files: Transform tabular configuration data between formats
Important Notes
- Very large files (over 10,000 rows) may cause slower processing depending on your browser. The preview table is limited to the first 100 rows for performance.
- When converting JSON to CSV, nested objects are flattened using dot-notation keys (e.g.,
user.name). Arrays within objects are serialized as JSON strings. - Type inference treats leading-zero strings (like
"007") as strings, not numbers, to preserve data integrity. - NDJSON output is not valid JSON - it is a newline-separated sequence of independent JSON objects.
- This tool works offline once the page has been loaded.
References:
Tech Blog with curated related content
Web Tools Collection
Written by Hidekazu Konishi