CSV ⇔ JSON Converter
Convert between CSV and JSON in either direction. Use dot notation in column headers (like user.name) to represent nested objects and arrays. Everything runs in your browser — your data is never sent anywhere.
Your data is processed entirely in your browser and is never sent anywhere.
Enter data above and click "Convert".
How to use
- Choose a direction: "CSV → JSON" or "JSON → CSV".
- Type or paste your data into the input box. To produce nested JSON, use dot notation in CSV column headers (e.g. user.name).
- Click "Convert" to see the result, then "Copy result" to copy it to your clipboard.
How it works
Conversion rules
CSV → JSON
The first line is treated as the header row (the keys), and each following row becomes one JSON object. Fields wrapped in quotes can safely contain commas or line breaks — a common source of bugs in hand-rolled CSV parsers, so this tool relies on a well-established CSV parsing library instead.
Using dot notation in a column header (like user.name, separated by .) produces a nested object ({ "user": { "name": ... } }). If the segments after the dots form a sequence of numbers (0, 1, 2, ...) — for example tags.0, tags.1 — that path becomes an array instead.
All values come out as strings. There's no automatic conversion to numbers or booleans, since whether "1" should become the number 1 or stay the string "1" depends on context the tool doesn't have — keeping it as-is is the safer default.
JSON → CSV
The JSON must be an array of objects (a single object is treated as a one-row array). Each object's keys are flattened recursively: nested objects become parent.child column headers, and arrays become parent.0, parent.1, ... column headers.
If different objects have different sets of keys, the column headers are the union of every key seen across all rows, and any missing cell is left blank. Values containing commas or line breaks are automatically wrapped in quotes.
Limits
The tool processes up to 5,000,000 characters at a time. Larger input is rejected outright rather than partially converted, since converting only part of a large file would produce broken output.
FAQ
Is my CSV or JSON sent anywhere?
No. Conversion happens entirely in your browser — nothing is transmitted to a server.
How do I represent a nested JSON object in CSV?
Use dot notation in the column headers, like user.name and user.age. When converting CSV to JSON, these automatically become a nested object. Going the other way, a nested object in your JSON is automatically flattened into dot-notation column headers.
Do numbers and booleans keep their type between CSV and JSON?
When converting CSV to JSON, every value comes out as a string (e.g. "30" rather than 30). There's no automatic type conversion, since plain CSV has no type information and guessing would risk silently changing your data.
What happens if my CSV rows have different numbers of columns?
You'll get an error explaining that the row and column counts don't match the header row. Check your CSV's delimiters and quoting.
Can I convert a very large CSV or JSON file?
Files up to 5,000,000 characters are handled normally. Beyond that, the tool shows an error instead of converting — partially converting a large file would produce broken output, so it's safer to split the file first.
Related tools
- Base64 Converter — Encode & Decode TextEncode text to Base64, or decode Base64 back to text — with correct handling of emoji and other multi-byte UTF-8 characters. Supports the URL-safe variant for JWTs and URL parameters. Everything runs in your browser; nothing is ever sent anywhere.
- CSV Column EditorExtract, reorder and merge CSV columns. Combine "First name" and "Last name" into a single "Full name" column, or reshape a contact list before importing it elsewhere. Everything runs in your browser — your data is never sent anywhere.
- JWT Decoder | View Header & Payload in Your Browser (No Signature Verification)Paste a JWT (JSON Web Token) to instantly decode and view its header and payload. This tool does not verify signatures. Everything runs in your browser only — your token is never sent anywhere.
- Kanji Numeral & Daiji Converter (Japanese)This tool converts numbers into Japanese daiji (壱, 弐, 参…, the formal anti-fraud numerals used on gift envelopes, contracts and receipts) and standard kanji numerals (千二百三十四…). It's specifically for Japanese-language numeral conventions. Everything runs in your browser — nothing is ever sent anywhere.
- All tools