DataSwitch Pro Private, in-browser data converter

CSV to Excel Converter

Turn any CSV into a proper .xlsx workbook — without Excel mangling your zeros, dates or special characters.

Copied to clipboard!
Rows
0
Columns
0
Delimiter
—
Input Size
0 B
Output Size
0 B
Speed
0 ms

How to convert CSV to Excel

Updated · 3 min read

Double-clicking a CSV file makes Excel guess what each value means, and it often guesses wrong. Converting the CSV into a real .xlsx workbook first stores every value with the right type, so the file opens exactly as intended for you and for anyone you send it to.

  1. Paste the CSV text or drop a .csv / .txt file onto the input box.
  2. The delimiter (comma, semicolon, tab or pipe) is detected automatically — check the Delimiter statistic below the editors.
  3. Review the preview: one line per row, columns separated by tabs.
  4. Click Download to save the .xlsx workbook.

Example

CSV input

product_code;description;quantity;price
00125;"Cable, USB-C 2m";40;7.90
00480;Câble HDMI 4K;12;12.50
1234567890123456789;Gift card;1;50

Excel output

product_codedescriptionquantityprice
00125Cable, USB-C 2m407.9
00480Câble HDMI 4K1212.5
1234567890123456789Gift card150

This semicolon-separated file is detected automatically. The product codes keep their leading zeros and the 19-digit code stays intact — opening the CSV directly in Excel would display 125, 480 and 1.23457E+18 instead.

Your data stays on your device. The conversion runs in JavaScript inside this tab — files and pasted text are never uploaded to DataSwitch Pro.

Why not just open the CSV in Excel?

When Excel opens a CSV directly, it applies its own interpretation to every cell:

This converter only types values that are unambiguously numbers or booleans, keeps everything else as text, and writes the result into a workbook where Excel no longer has to guess.

Delimiters and encodings

The delimiter is detected by checking which character splits every line into the same number of fields. Files exported by Excel in Unicode (UTF-16) or by older software in Windows-1252 are recognised and decoded automatically when you upload them, so accented characters come through intact.

The generated workbook

The workbook contains one sheet named Data with a bold, frozen header row and columns sized to their content. Numbers and booleans are real typed cells, so formulas and pivot tables work right away. Values that start with =, + or @ are stored as plain text, which also protects you from CSV formula injection.

Convert CSV to Excel in code

For one-off files the tool above is quickest. To automate the same task in a script or pipeline, these snippets are a good starting point.

Python (pandas)

import pandas as pd  # pip install pandas openpyxl

# dtype=str keeps leading zeros and long codes exactly as written
df = pd.read_csv("data.csv", sep=None, engine="python", dtype=str)
df.to_excel("data.xlsx", index=False)

Node.js

// npm install csv-parse write-excel-file
import { readFileSync } from "node:fs";
import { parse } from "csv-parse/sync";
import writeXlsxFile from "write-excel-file/node";

const rows = parse(readFileSync("data.csv"), { bom: true, delimiter: ";" });
await writeXlsxFile(rows).toFile("data.xlsx");

Frequently asked questions

Can I paste CSV instead of uploading a file?

Yes. Paste the text into the input box; the delimiter is detected and the preview updates as you type.

Are formulas in the CSV executed?

No. Text that looks like a formula is stored as a text cell, so a malicious value such as =HYPERLINK(…) cannot run when the workbook is opened.

How many rows can I convert?

An Excel sheet holds up to 1,048,576 rows. The converter itself has no server limit; very large files depend on your device's memory.

Can I keep every value as text?

Yes. Untick Detect numbers & booleans in Options and every cell is written as text.

Does it work with TSV files?

Yes. Tab-separated files are detected automatically, or select TSV as the source format.

Related converters