Nimble Toolbox

CSV to Excel converter

Paste a CSV or drop a .csv file and download it as an Excel workbook. Columns of numbers become numbers, while a postcode such as 02134 or a 16-digit card number keeps every digit.

Workbook

The sheet appears here once there is CSV to convert.

How to use it#

  1. Paste the CSV into the box above, or drop a .csv, .tsv, or .txt file onto it.
  2. Check the delimiter it detected, and whether the first row holds the column names.
  3. Untick "Write numbers as numbers" to keep every cell as text.
  4. Download the .xlsx workbook.

Why opening a CSV in Excel changes it#

Excel guesses at every cell of a CSV it opens. A postcode of 02134 loses its zero and becomes 2134, a phone number such as 07700 900123 becomes 7700900123, a long order number turns into 1.23457E+15 with its last digits gone for good, and a code such as 1-2 or MAR1 can come back as a date. Saving the file again writes those changes into it.

The workbook made here decides each column once, from all its cells. A column of plain numbers is written as numbers, so it adds up and sorts as numbers, and shows 36.50 as 36.5 and 1,234 as 1234 until you format the column. A column where any cell starts with a zero and another digit, as 02134 does, or runs past the 15 significant digits Excel keeps, is written as text, and the panel beside the box names it. Every other cell is text exactly as it was in the CSV, dates included, so nothing is turned into something else.

Delimiters, quotes, and header rows#

The delimiter is detected from the first lines: a comma, a semicolon as many European exports use, a tab, or a pipe. The list under "Delimiter" names the one it found, and choosing another splits the rows again; for a file split on some other character, choose Custom and type it. In a semicolon CSV a comma is usually a decimal comma, so a column such as 3,50 or 1,234 stays text rather than be read as the wrong number; a value such as 1,234.50, with a point after the comma, is still read as a number. A field in double quotes can hold the delimiter, quotes, and line breaks, as RFC 4180 sets out, and stays one cell.

With "First row is a header" ticked, the first row is written in bold and frozen, so it stays in view as the sheet scrolls. Untick it for a CSV with no names at the top, and every row is data.

Formulas and other things that could go wrong#

A cell starting with "=", "+", or "@" is written as text, so a CSV from somewhere you do not trust cannot run a formula when the workbook is opened. A cell that should be a formula has to be typed again in Excel.

The file is an .xlsx, which Excel 2007 and later, Google Sheets, Numbers, and LibreOffice all open, not the older .xls. One CSV becomes one sheet, named after the file. To put several CSVs into one workbook, convert them to JSON with the CSV to JSON converter, join them as an object of arrays, and build the workbook with JSON to Excel, which makes a sheet for each.

Frequently asked questions#

Will it keep leading zeros?

#

Yes. A column where any value starts with a zero followed by another digit, such as a postcode, a phone number, or a product code, is written as text, so 02134 stays 02134. The panel beside the box lists those columns. Untick "Write numbers as numbers" to keep every column as text.

Why does a long number turn into 1.23E+15 in Excel?

#

Excel stores numbers to 15 significant digits and shows a long one in scientific notation. A 16-digit card number or a 19-digit order ID loses its last digits as a number. Columns like that are written as text here, so every digit stays.

Does it change dates?

#

No. Dates are written as the text they were in the CSV, so 03/04/2024 stays 03/04/2024 rather than being read as March or April depending on the computer. Excel can turn a column of them into dates with Data, Text to Columns, once you know which order they are in.

Is there a row limit?

#

Only the sheet's own: 1,048,576 rows and 16,384 columns, the most an Excel sheet holds, and 32,767 characters in a cell. A CSV past any of those is refused with the limit named.

Is the CSV uploaded anywhere?

#

No. The workbook is built in this browser tab, so a customer list or a payroll export is never sent anywhere.