Converters.live

CSV file format

CSV is the universal format for tabular data: a plain text file that every spreadsheet, database and programming language can read — with a few traps worth knowing.

or drag & drop them here · images, video, audio and documents · up to 2 GB

What is CSV?

A CSV file is text where each line is a record and columns are separated by a delimiter. The convention predates most software still in use and was only formally described in 2005 by RFC 4180, which is why implementations differ in the details. There is no formatting, no formulas, no multiple sheets and no data types — only characters.

That simplicity is exactly why CSV survives. Every database import, every analytics tool, every scripting language and every spreadsheet reads it, so it is the natural handoff format between systems that share nothing else. What it cannot do is preserve anything about how a spreadsheet looked or calculated.

The traps all come from the format having no way to describe itself. Nothing in the file states its encoding, its delimiter or how values should be typed, so the receiving program guesses — and Excel in particular guesses aggressively, converting product codes into dates and stripping leading zeros from postal codes and identifiers.

Extension.csv
CategoryDocument
MIME typetext/csv
Released2005
Developed byIETF RFC 4180
CompressionNone (uncompressed)
Ad slot — enable ads in public/ads.js · landing-article

CSV: frequently asked questions

Why does Excel put my whole CSV in one column?
Because your system locale expects a different delimiter. In many European locales Excel treats semicolons as the separator and ignores commas. Use Data → From Text/CSV and set the delimiter explicitly rather than double-clicking the file.
Why do leading zeros disappear from my data?
Because Excel reads unquoted values as numbers, and a number has no leading zeros — so 01234 becomes 1234. Postal codes, product IDs and phone numbers all suffer. Import the column explicitly as text instead of letting Excel guess.
Why did my values turn into dates?
Excel autoconverts anything that looks like a date, so 1-2 becomes 1 February and MAR1 becomes a March date. This is famous enough that geneticists renamed several genes to stop Excel corrupting them. Set affected columns to text during import.
What encoding should I use for CSV?
UTF-8, and add a byte order mark if the file will be opened in Excel — without it Excel may misread accented and non-Latin characters. Any tool that shows names as strings of question marks or garbled symbols is reading the wrong encoding.
How are commas inside a value handled?
By wrapping the value in double quotes, so `"Smith, John"` stays a single field. A quote inside a quoted value is written twice. Any well-behaved reader follows this rule, but hand-edited files often break it, which is how columns end up shifted.
CSV or XLSX for exchanging data?
CSV when another system will import raw values — it is smaller, simpler and universally readable. XLSX when formulas, formatting, multiple sheets or data types need to survive. Exporting to CSV discards all of those permanently.

Convert from CSV

Convert to CSV