Sample CSV Files: Copy-Ready Examples With Headers, Quoting and TSV Versions

Copy-ready sample CSV files with a header row, quoted fields and a TSV version, plus what CSV-to-TSV conversion changes and what to check before you rely on a sample.

If you need a CSV file sample to test an import, a parser or a conversion tool, you can build one yourself from the plain-text examples below. Copy an example into a text editor, save it with a .csv extension, and you have a working file. You do not need to download it from an unfamiliar site. This guide also explains what changes when you convert between CSV and TSV, and what can go wrong after you open, paste or share the file.

What a sample CSV file is

A CSV (comma-separated values) file is plain text. Each line is a record, and commas separate the fields within a record. The first line is often a header that names the columns. The most widely cited description of the format is RFC 4180. It is an informational document, not a strict standard, so real-world files and tools differ on details such as the delimiter, quoting, line endings and character encoding. A good sample file exercises the details that matter for your workflow, not just the easy cases.

Basic CSV file with a header row

This minimal example has a header row and a few records. All names and values are fictional. The zip_code column is included on purpose, because leading zeros are a common source of trouble later.

id,first_name,last_name,city,state,zip_code,amount
1,Jordan,Lee,Boston,MA,02134,19.99
2,Sam,Patel,Denver,CO,80202,250.00
3,Alex,Kim,Austin,TX,73301,7.50
  • The header and every record should have the same number of fields. Here, each line has seven.
  • No field contains a comma, a double quote or a line break, so no quoting is needed.
  • Values are stored exactly as typed. The file itself does not mark 02134 as text or 19.99 as a number. Any typing is applied by whatever program reads the file.

CSV text file example with quoted fields

A useful test file includes the cases that break naive parsers. Under the RFC 4180 conventions, a field that contains a comma, a double quote or a line break is wrapped in double quotes. A double quote inside such a field is written as two double quotes.

id,product,description,price
1,"Desk, oak","Solid oak desk, 48 in. wide",249.00
2,Lamp,"Shade marked ""LED only""",34.50
3,Notebook,"Line one
Line two",3.25
4,Café mug,Glazed ceramic,12.00
  • Record 1: commas inside quoted fields are data, not delimiters.
  • Record 2: the description field's value is: Shade marked "LED only".
  • Record 3: the description contains a line break, so this one record spans two physical lines. Tools that split the file on line breaks will miscount records.
  • Record 4: a non-ASCII character (é) tests whether encoding is handled correctly.

The same data as TSV

In a TSV (tab-separated values) file, a tab character separates the fields. Here is the basic example converted to TSV. The gaps between fields are single tab characters, not spaces.

id	first_name	last_name	city	state	zip_code	amount
1	Jordan	Lee	Boston	MA	02134	19.99
2	Sam	Patel	Denver	CO	80202	250.00
3	Alex	Kim	Austin	TX	73301	7.50

Some editors convert tabs to spaces when you paste or save. After saving a TSV sample, check that the separators are still real tab characters.

What CSV-to-TSV conversion actually changes

Converting between CSV and TSV changes the stored characters, not just how the data looks. The delimiter changes. Depending on the tool, quoting rules, escape sequences and line endings may change too. If the field values are the same before and after, the meaning is preserved. Whether the conversion is safe depends on how the tool handles the edge cases.

Aspect | CSV | TSV
Field separator | Comma | Tab character
Fields containing the separator | Wrapped in double quotes | Uncommon, since tabs rarely appear in data; handling varies by tool
Embedded double quotes | Doubled inside a quoted field | Often left as-is; some tools still apply CSV-style quoting
Embedded line breaks | Allowed inside quoted fields | Not supported by the basic IANA TSV definition; some tools use escapes such as \n instead
Header row | Optional, by convention | Expected by the basic IANA TSV definition

The riskiest cases are the ones in the quoted sample: fields with embedded line breaks, fields with quotes, and fields with the target delimiter. Run a converter on that sample and compare field values, not just line counts. Silent changes are the main hazard. Look for quotes that were stripped, a line break turned into a literal backslash-n, or a field split into two columns.

Character content should pass through unchanged. An accented letter can be stored as one precomposed code point or as a base letter plus a combining mark. Both render the same, but they are different bytes. A conversion that normalizes text can change one form into the other. Then exact-match comparisons or deduplication may stop matching, even though nothing looks different on screen.

Will the file stay usable after copying, opening or sharing?

  • Spreadsheet type guessing: Spreadsheet programs commonly reinterpret values when they open a CSV. Common results are lost leading zeros (02134 becomes 2134), date-like text turned into dates, and long digit strings shown in scientific notation. Saving the file again can make these changes permanent. Use the program's import option to set columns as text when exact values matter.
  • Encoding: Save samples as UTF-8. Some spreadsheet software may not detect UTF-8 without a byte order mark and will show characters like é as garbled symbols. If your target program behaves this way, check its documentation or test the file with that specific program.
  • Delimiter and locale: In regions where the comma is the decimal separator, software often expects semicolons in CSV files. A file that opens correctly in a US setup may land in a single column elsewhere.
  • Line endings: RFC 4180 describes CRLF line endings, but many tools write LF only. Most modern parsers accept both. Strict or older importers may not.
  • Pasting: Pasting tab-separated text into a spreadsheet often splits it into columns automatically. Pasted comma-separated text may land in a single column unless you use a text-import or split feature. Behavior varies by application, so test the program you actually use.
  • Accessibility: A screen reader reads raw CSV as text, including every comma, which is hard to follow for more than a few columns. Opened as a table in a spreadsheet, the same data can usually be navigated by row and column. If people will read the data rather than import it, share it as a table or as plain sentences, not as raw CSV text.

Is a sample CSV file right for your use?

A small hand-built sample is the right choice when you need to check an import, a parser or a CSV/TSV converter. You control every edge case, and the file contains no real personal data. The main tradeoff is coverage: a sample only proves your workflow handles the cases you put in it. Include at least one quoted comma, one embedded quote, one multi-line field, one non-ASCII character and one value with leading zeros. If you need realistic volume or messy real-world data, a small sample will not reveal performance limits or every unexpected input.

Plain text or a formatted table works better when the goal is for people to read the data. CSV is a format for exchanging data between programs, not for presenting it.

Checking a downloaded sample before relying on it

If you download an example CSV file instead of making one, inspect it before trusting it:

  • Open it in a plain text editor first, not a spreadsheet. That way you see the actual characters, not an interpreted view.
  • Confirm the delimiter, whether a header row is present, and that every record has the same number of fields.
  • Check the encoding and line endings if your editor shows them.
  • Do not assume sample data is fictional, or that a download site has any particular privacy or retention practice, just because it looks professional. Neither is confirmed here.

Gaps in this guide

This guide does not review or test any specific download site, converter or spreadsheet program. The compatibility notes describe commonly reported general behavior, not verified results for a particular product or version. Confirm how your own tools handle encoding, delimiters, type detection and multi-line fields using the quoted sample above.