CSV to JSON converter (and JSON to CSV)
This CSV to JSON converter also works backwards (JSON to CSV): paste a table or JSON, pick the direction, copy the result or download it. The tool detects comma, semicolon, tab or pipe delimiters by itself, turns numbers into real numbers and reports errors with the line number. Your data never leaves the browser.
Source: § 2, IETF RFC 4180 – Common Format and MIME Type for Comma-Separated Values (CSV) Files. Updated: .
How it is calculated
CSV (comma-separated values) is the simplest table format: one line per record, fields split by a delimiter. JSON is the data format of web APIs. This tool converts in both directions – entirely in your browser.
How to convert CSV to JSON
- Paste the CSV text (from a spreadsheet: copy the cells and paste – the delimiter is then a tab).
- Keep the direction “CSV → JSON”. The delimiter is detected; choose one yourself if needed.
- Pick the shape: an array of objects (each row becomes
{"column": value}) or an array of arrays. - Copy the result or download it as
daten.json.
Types: number or text?
CSV has no data types – everything is text. With “Detect numbers and true/false” values become JSON numbers, but only when nothing is lost: the value must be a valid JSON number under RFC 8259 § 6 (no leading zero, no plus sign, no decimal comma) and fit into 15 significant digits. ZIP codes like 01067, phone numbers and card numbers stay text.
Converting JSON to CSV
An array of objects becomes a table: the columns are the union of all keys in order of first appearance, missing values stay empty. Nested objects and arrays are written as JSON text into the cell because CSV has no depth. Fields containing the delimiter, a quote or a line break are quoted as RFC 4180 requires.
Limits
- Very large inputs (over 5 million characters) are refused so the browser does not freeze.
- Excel only shows accented characters in UTF-8 CSV correctly if the file starts with a byte order mark – the download includes one.
- Formulas in cells (
=SUM(…)) are a security risk in spreadsheets; “formula protection” defuses them on export.
Frequently asked questions
How do I convert CSV to JSON?
Paste the CSV into the input box and choose “CSV → JSON”. The first row provides the keys, every further row becomes an object. Copy the result or download it.
Why does my CSV use semicolons instead of commas?
In many European locales spreadsheets use the comma as decimal mark and therefore write the semicolon as list separator. The tool detects both automatically; if in doubt, pick the delimiter by hand.
Are leading zeros (like ZIP code 01067) kept?
Yes. Values with a leading zero stay text because JSON numbers may not have one (RFC 8259). To keep everything as text, switch off “Detect numbers and true/false”.
What happens to nested JSON when converting to CSV?
CSV is flat, so objects and arrays inside a record are written as JSON text into the cell. Flatten the structure first if you need a plain table.
How do I convert CSV to JSON in Python?
With the standard library: csv.DictReader(file) reads rows as dictionaries and json.dumps(list(reader), indent=2) writes them as JSON. For a one-off conversion this page is quicker.
Is my data uploaded anywhere?
No. The conversion runs in your browser and makes no server request. The input is not stored or added to the address bar either.
Sources and legal basis
- § 2: IETF RFC 4180 – Common Format and MIME Type for Comma-Separated Values (CSV) Files
- STD 90, §§ 2, 6: IETF RFC 8259 – The JavaScript Object Notation (JSON) Data Interchange Format
- OWASP – CSV Injection
As of:
Related tools
- JSON formatter, validator and minifierValidate JSON against RFC 8259 with the exact line, column and a plain-English explanation. Beautify or minify, sort keys, copy. Runs locally in your browser.
- XML and CSV validator onlineCheck XML for well-formedness and validate CSV against RFC 4180: errors with line and column, auto-detected delimiter, table preview. Runs locally.
- YAML to JSON converter (and JSON to YAML)YAML to JSON converter and JSON to YAML following YAML 1.2: lists, anchors, text blocks, comments. Errors show the line number. Runs in your browser, no upload.
- Base64 Encode and DecodeEncode and decode Base64 and Base64url with proper UTF-8, plus URL encode/decode (percent-encoding). Clear error messages, runs locally in your browser.
- Text Compare: Find Differences Between Two TextsCompare two texts online and highlight the differences by line, word or character, with a similarity score. Free, private, runs in your browser.
- ASCII table with decimal, hex, octal, binary and Unicode lookupComplete ASCII table (0–127) plus Latin-1 (128–255): decimal, hex, octal, binary, HTML entity, control codes. Look up any Unicode character, UTF-8 included.