DEVELOPER TOOLS

CSV to JSON and JSON to CSV Converter

Turn CSV into a JSON array of objects or JSON into a clean, Excel-ready CSV. Supports comma, semicolon and tab delimiters, all in your browser.

Everything happens on your device. Your inputs and files are never sent to a server.

Spreadsheets speak CSV, while APIs, scripts and databases prefer JSON. Seeding a test database from an Excel export or handing a JSON report to a colleague who lives in Google Sheets needs a reliable bridge. This converter works in both directions: CSV to JSON produces an array where each row is an object keyed by the header row, and JSON to CSV flattens an array of objects into a table.

The conversion runs entirely in your browser, so customer lists, order exports and internal reports are never uploaded. You can process up to 1 MiB of input, 10,000 records and 50 columns at once. The parser follows standard CSV quoting rules, and the CSV you download is saved as UTF-8 with a byte order mark so Excel displays accented characters correctly.

How to use: CSV to JSON and JSON to CSV Converter

  1. Select CSV → JSON or JSON → CSV in the Direction menu.
  2. Pick the CSV delimiter that matches your data: Comma (,), Semicolon (;) or Tab.
  3. Paste your data into the CSV or JSON field, or press Load sample to see the expected format.
  4. For JSON → CSV, leave the CSV formula safety option checked if the file will be opened in a spreadsheet.
  5. Press Convert and review the Result panel. Error messages name the line and column count that caused a problem.
  6. Use Copy for the clipboard or Download to save a .json or .csv file.
EXAMPLE

Example: name,city / Alex,London becomes [{"name": "Alex", "city": "London"}].

How CSV to JSON conversion works

The first row is the header; every header must be non-empty and unique. Each following row becomes one object, and every value stays a string, so 42 becomes "42". This avoids type guessing that strips leading zeros from ZIP codes. The delimiter is not auto-detected, a leading UTF-8 byte order mark is removed, and both CRLF and LF line endings work.

  • Fields containing the delimiter, a line break or a double quote must be wrapped in double quotes.
  • A quote inside a quoted field is doubled: "She said ""hi""".
  • A stray quote inside an unquoted value, or a space before the opening quote, is reported as an error.
  • Every row needs as many columns as the header, so a blank line mid-file triggers a column count error.

How JSON to CSV conversion works

The input must be a JSON array of objects. Headers are collected from all objects in first-seen order, so records with different keys still line up; missing keys and null become empty cells, and nested objects or arrays are written into one cell as JSON text. Every cell is double-quoted and rows end with CRLF, following RFC 4180. Integers beyond the JavaScript safe range are rejected rather than rounded; pass such IDs as strings.

Excel, UTF-8 and the semicolon delimiter

Excel often opens a UTF-8 CSV without a byte order mark using a legacy code page, turning é into é. The Download button adds a UTF-8 BOM to prevent this; if you copy the result instead, save it as "CSV UTF-8" or use Data > From Text/CSV. Where the comma is the decimal separator, as in much of Europe, Excel expects semicolons, so convert with Semicolon (;) if everything lands in one column.

CSV formula injection and how the safety option helps

Spreadsheet apps treat a cell that starts with =, +, - or @ as a formula, so untrusted data such as a user-submitted =HYPERLINK(...) can run when the CSV is opened. With CSV formula safety on, cells beginning with these characters, a tab or a carriage return get a leading single quote and display as plain text. The trade-off: values like -15 or +1 555 0100 are prefixed too, so uncheck the option for CSV headed to another program rather than a spreadsheet.

Frequently asked questions

How do I convert CSV to JSON?

Select CSV → JSON as the direction, choose the delimiter your file uses, paste the CSV including its header row and press Convert. Each data row becomes a JSON object whose keys come from the header. You can copy the resulting array or download it as a .json file. The conversion happens in your browser, so the data is not uploaded.

Why does my CSV with semicolons end up in one column?

The converter uses the delimiter you select and does not guess it. If the file was exported from Excel in a region that uses commas as decimal separators, it is probably separated by semicolons. Change CSV delimiter to Semicolon (;) and convert again. Tab-separated files, often saved as .tsv, need the Tab option.

What happens to nested JSON objects when converting to CSV?

Nested objects and arrays are not split into extra columns. Instead, each one is written into a single cell as compact JSON text, such as {"city":"Paris"}. This keeps one record per row and one column per top-level key. If you need dotted columns like address.city, flatten the objects in your code before converting.

Why do some cells start with an apostrophe?

That is the CSV formula safety option at work. Cells beginning with =, +, - or @ get a leading single quote so spreadsheet apps treat them as text instead of executing them as formulas, which protects against CSV injection. If your data includes negative numbers or phone numbers with a plus sign, uncheck the option before converting.

What are the size limits?

Each conversion accepts up to 1 MiB of input, 10,000 records and 50 columns, and can produce up to 10 MiB of output. For larger files, split them into chunks by row and convert each part separately. Because everything runs locally, performance depends on your device, but files within these limits convert almost instantly.

Cookie and ad preferences

Your favorites and theme preference are stored on your device. Tool inputs are never saved. Ads load only when the consent management integration allows them.

No consent management platform is connected on this installation, so no ad requests are sent.