CSV ↔ JSON Converter
Convert tabular CSV data to structured JSON and JSON arrays to CSV.
About this tool
CSV is how spreadsheets, databases and analytics tools exchange tables; JSON is how APIs and web applications exchange data. Moving between them sounds trivial until you meet a comma inside a name, a line break inside a cell, a zip code that loses its leading zero, or an Excel file that saves with semicolons. This converter handles those cases correctly, following RFC 4180.
It converts both ways, detects the delimiter automatically, shows the result as a table so you can check columns line up, and lets you decide exactly how values are typed. Conversion runs in your browser, so customer lists and exports never leave your machine.
How to use CSV ↔ JSON Converter
- Choose CSV → JSON or JSON → CSV, then paste data or open a .csv, .tsv or .json file.
- For CSV input, leave the delimiter on Auto-detect or pick comma, semicolon, tab or pipe. Excel in many European locales saves with semicolons.
- Decide how values are typed: with "Detect numbers & booleans" on, 42 becomes a number and true a boolean, while values like 02134, +15550100 or very long IDs stay strings so nothing is lost. Turn it off to keep every value as text.
- Tick "Nest a.b columns" to turn headers such as user.name into nested objects. For JSON → CSV, nested objects are flattened into dot-path columns.
- Switch the result to Table to check the columns, then copy or download. CSV downloads include a UTF-8 BOM by default so Excel shows accents and CJK characters correctly.
Examples
Quoted fields and leading zeros
id,name,zip 1,"Lee, Min-jun",02134
[
{ "id": 1, "name": "Lee, Min-jun", "zip": "02134" }
] The comma inside quotes stays part of the name, and the zip code keeps its leading zero.
Nested JSON to flat CSV
[{ "id": 1, "team": { "name": "Data", "lead": true } }] id,team.name,team.lead 1,Data,true
CSV rules that trip people up
- A field containing the delimiter, a double quote or a line break must be wrapped in double quotes, and quotes inside it are doubled: "He said ""hi""".
- There is no standard delimiter. Comma is the default, but semicolon is common where the comma is the decimal separator, and TSV uses tabs.
- CSV has no types. Whether 007 is a number or a code is your decision, which is why automatic typing never converts values that would change when re-printed.
- Encoding matters: save and read CSV as UTF-8. Excel only detects UTF-8 reliably when the file starts with a byte-order mark (BOM).
CSV injection
Spreadsheet programs treat cells that begin with =, +, - or @ as formulas. If you export user-supplied data, a value like =HYPERLINK(...) can run when someone opens the file. "Protect against formula injection" prefixes such cells with an apostrophe, the mitigation recommended by OWASP. Turn it off only if the CSV is meant for a program rather than a spreadsheet.
Frequently asked questions
Everything you need to know about this tool and data security.
Why do my numbers stay as strings?
Values that would change when converted to a number are kept as text: leading zeros (007), plus signs (+1), trailing zeros after a decimal point (1.50) and integers too large for JavaScript to represent exactly. This prevents silent data loss in IDs, phone numbers and zip codes.
My CSV has no header row. What happens?
Untick "First row is header" and each row becomes an array of values instead of an object.
How large a file can it handle?
Files of several megabytes convert in well under a second. The table preview shows the first 200 rows to stay fast, but the text output always contains everything.
Why does Excel show strange characters in my CSV?
Excel assumes a legacy encoding unless the file starts with a UTF-8 BOM. Keep "Excel-friendly download" ticked, or import the file through Data → From Text/CSV and choose UTF-8.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Prettify, validate, and minify JSON data instantly in your browser.
Convert bidirectionally between JSON and YAML in real time.
Encode text to Base64 or decode Base64 to UTF-8 text with instant live conversion.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.