CSV ↔ JSON Converter
CSV to JSON converter is a data tool that turns comma-separated rows into a JSON array of objects and converts JSON arrays back to CSV. It uses the header row as keys, parses quoted fields with embedded commas, quotes, and line breaks per RFC 4180, and downloads the result as a .json or .csv file. The tool runs in your browser.
CSV Input
Output
CONVERT
Comma-separated input. First row is used as object keys. Quoted fields with commas are handled correctly.
Runs entirely in your browser
Dedicated pages
Direct links for each conversion direction.
CSV to JSON Converter
Convert CSV to JSON, parsing quoted fields with embedded commas and line breaks per RFC 4180. Copy the JSON array or download it. Runs in your browser.
JSON to CSV Converter
Convert a JSON array of objects to CSV, with a header row built from every key and nested values written as JSON text. Runs in your browser.
CSV to JSON array of objects
Convert any CSV data into a JSON array of objects. Handles quoted fields and commas inside values. Free, runs in your browser.
JSON to CSV for spreadsheets
Convert JSON arrays to CSV format instantly in your browser. Handles quoted values and special characters. Free, runs in your browser.
How to convert CSV to JSON
- Paste your comma-separated data into the input area.
- The first row is always used as the keys. If your CSV has no header row, add one before pasting.
- The output is a JSON array with one object per data row.
- Click "Copy" or "Download" to get the converted JSON.
Common uses
- Converting data exports from spreadsheet applications to JSON for APIs, then format the JSON output for readability
- Transforming CSV reports into JSON for JavaScript applications
- Preparing data for import into a database or no-code platform that expects JSON, use Base64 encoding if you need to embed the data in a text-only payload
Technical specification
- Algorithm or formula: Custom hand-written CSV parser that handles quoted fields, escaped double quotes (
""), embedded commas, and CRLF or LF line endings per RFC 4180. JSON output usesJSON.stringifywith two-space indentation. - Browser API or library: Native
JSON.parseandJSON.stringify. No external parsing library. - Input limits: Bounded by browser memory. Multi-megabyte CSV converts quickly on modern devices.
- Output: JSON array of objects, one per data row, keyed by the header row. A repeated header name gets a numeric suffix (for example
a_2) so no column is lost. The reverse direction emits comma-delimited CSV with one column for every key found in any object. Cells starting with =, +, -, @, a tab or a carriage return get a leading single quote so spreadsheets treat them as text. - Known limitations: Only comma delimiters are supported. A value in a column past the last header has no key, so it is left out, and the tool shows a warning when that happens. Nested objects and arrays are not flattened into columns; they are written as JSON text in a single cell, so they come back as text when converted to JSON again.
Frequently asked questions
- What delimiters and conversion directions does this tool support?
- Both directions: CSV to JSON and JSON to CSV. The tool reads and writes comma-separated values. Semicolon- or tab-separated data is read as a single column, so replace those separators with commas before pasting. Quoted fields containing commas, newlines, or quotes are parsed per RFC 4180.
- Is my CSV data uploaded anywhere?
- All conversion happens in your browser. Our servers are not involved at any point.
- Are numbers and true/false kept as JSON types?
- CSV carries no types, so every value in the JSON output is a string: 30 becomes "30" and true becomes "true". Convert the fields you need in your own code afterwards.
- Why do some CSV cells start with a single quote?
- When converting JSON to CSV, cells that begin with =, +, -, @, a tab, or a carriage return get a leading ' so spreadsheet apps treat them as text rather than formulas.
Related tools
JSON formatter
Pretty-print, minify, validate, and sort JSON keys. Instant output.
YAML formatter
Format, validate, and convert YAML. Compatible with Kubernetes, CI configs, and OpenAPI files.
XML formatter
Pretty-print, minify, and validate XML. Uses the browser's native DOMParser.
Sort lines
Sort lines alphabetically, by length, or shuffle randomly. Remove duplicates and empty lines in one click.
- Background reading: Complete guide to data tools
- Step by step: Turn a CSV into clean JSON for an API
Reviewed and tested September 30, 2026.