The quick answer
You exported a CSV and Excel turned the dates into numbers, dropped the zeros from your ZIP codes and garbled the accents. Or an API wants JSON and you only have a spreadsheet. Open the page for your direction: CSV to Excel, Excel to CSV, CSV to JSON or JSON to CSV. All four run on the same Data Converter, so the steps are nearly the same.
- Drop the file on the input box, press Load a file (Choose an Excel file for a workbook), or paste the text. If the workbook has several sheets, pick one under Sheet to convert.
- Check the header row, the delimiter and, for a CSV going to Excel or JSON, how cells are read. Under Cell values, choose Keep as text if every cell must stay exactly as written.
- Read the notes under the result. They say what was assumed, flattened or left out.
- Copy the result, or press Download.
Why Excel mangles a CSV
A CSV has no types and does not say which encoding it uses. Excel guesses cell by cell as it opens the file, and saving writes the guesses back, so the damage is done before you press Save as .xlsx.
- Leading zeros: 00123 becomes 123, which breaks ZIP codes, product codes and phone numbers.
- Long numbers: Excel keeps 15 significant digits. A 16 digit tracking number is shown in scientific notation and the digits after the fifteenth become zeros.
- Dates: text such as 1-2 or 3/4 becomes a date. It was a big enough problem that the committee that names human genes renamed genes such as SEPT1 and MARCH1.
An .xlsx workbook stores every cell with its type, so none of that guessing happens when it opens. The converter does the typing once, up front, and shows the first rows so you can check them before you download.
The four conversions at a glance
| Conversion | Worth knowing |
|---|---|
| CSV to Excel | One sheet in a real .xlsx. Values such as 00123 and numbers over 15 digits stay text. Dates stay text, because 03/04/2024 could be the 3rd of April or the 4th of March. |
| Excel to CSV | Only .xlsx, not old .xls or password protected files. You get stored values, not what was displayed: a cell showing 25.5% is written as 0.255. Save one sheet, or every sheet as its own CSV in a ZIP. |
| CSV to JSON | Each row becomes an object. Numbers and true or false are detected per column, and a header such as address.city becomes a nested object. |
| JSON to CSV | Nested objects and lists are spread into columns. The columns are the union of all keys, with an empty cell where a record lacks one. |
A column becomes numbers only when every filled cell in it is a clean number: no leading zeros, no thousands separators, at most 15 digits. One stray n/a keeps the whole column as text. To turn text dates into real Excel dates afterward, in desktop Excel select the column, choose Data, then Text to Columns, press Next twice and pick Date with the order your data uses. Menu names can differ by version.
Accents and encoding: why é becomes é
Encoding is how letters are stored as bytes, and a CSV does not say which one it used. Excel's plain "CSV (Comma delimited)" choice often saves Windows-1252, and newer versions also offer a "CSV UTF-8" choice that writes UTF-8. Excel for Windows also tends to read a CSV as Windows-1252 unless the file starts with a byte order mark. That mismatch turns é into é. The same bytes-versus-letters mix-up garbles decoded Base64 text, as Base64 explained shows.
- Reading a CSV: the converter looks at the bytes. UTF-8 and UTF-16 are read as they are, and a file that is not valid UTF-8 is read as Windows-1252, with a note. Other legacy encodings cannot be guessed, so save such a file as UTF-8 first.
- Writing a CSV for Excel: in JSON to CSV, open More options and turn on Add a byte order mark. Some other programs dislike the mark, so leave it off for those.
- Question marks in the source? The export already lost those letters and no converter can bring them back. Export again as UTF-8.
Comma, semicolon or tab
Excel splits a CSV at your computer's list separator. In many European countries, where the decimal mark is a comma, that is a semicolon, so one person's CSV opens as a single column for someone else.
When reading, the converter tries a comma, tab, semicolon and pipe on the first rows and honors a first line such as sep=;. With only one or two columns detection has little to go on, so set the delimiter yourself. When writing, choose the one your spreadsheet expects. Tab separated files and cells copied from a spreadsheet are covered by TSV to CSV.
Nested JSON to a flat table
A table cell holds one value, so nested JSON is spread out. Columns are named by path: {"name": "Ana", "address": {"city": "Lisbon"}, "tags": ["a", "b"]} becomes name, address.city, tags.0 and tags.1.
- Lists can become separate columns, one joined cell such as
a;b, or JSON text in one cell. Separate columns is the only choice that converts back to the same JSON. - Different keys: the columns are the union of all keys. A record without a key gets an empty cell, and so does a null. A few mostly empty columns are correct, not a fault.
- API responses such as
{"status": "ok", "data": {"items": [...]}}: the converter uses the list of records as the rows and names the keys it left out. Type a path such asdata.itemsunder Rows come from to choose another part. - Going back: dotted columns become nested objects again. A missing value and an empty cell look alike in a table, so they return as null.
If the JSON will not load, format and validate it first to see the line and column of the problem.
Large files and limits
- An Excel sheet holds at most 1,048,576 rows including the header, 16,384 columns and 32,767 characters per cell. A CSV with more rows is refused with a message saying how many it needs, so split it. A longer cell is cut, with a note.
- Speed depends on your device. In our tests, a 50,000 row CSV (4.6 MB) became JSON in about a tenth of a second and 500,000 rows (48 MB) in about two seconds. Writing Excel is slower: 200,000 rows took about 5 seconds.
- A hard cap: a file over 250 MB is refused with a message to split it. Phones and older computers manage less, and the page may not respond while it works.
- Reading Excel: one sheet at a time, with a formula giving the last value Excel calculated. Formatting, colors, charts and macros are not kept.
Customer exports, privacy and formulas
A customer export is names, emails, addresses and orders, and many free converters upload the file to a server. Here the file is read and converted in your browser tab, with no account. To check, open the Network tab in your browser's developer tools and convert a file: no request carries it. The same question for documents is covered in is it safe to upload a PDF to a free website.
One risk sits in the file itself. Text that starts with =, +, - or @ can run as a formula when a spreadsheet opens a CSV. CSV to Excel writes such text as plain text, and JSON to CSV has a Protect against spreadsheet formulas option for data you do not control.