CSV with quoted fields, embedded commas and line breaks
A short CSV file in which fields contain commas, doubled quotation marks, line breaks, leading spaces and empty values.
Download
sample-csv-quoted-fields.csv
324 B324 bytes
Download CSV sampleDirect download. No sign-up and no waiting.
- Type
- text/csv
- SHA-256
10abd64257b1afd45bbb9c836ca9adac683fa818b99fe9d08c0cad7b276d97b5- Direct URL
https://sampletestfiles.com/downloads/samples/sample-csv-quoted-fields.csv
Why test with this file
Finds importers that split on every comma or every newline instead of following the quoting rules of RFC 4180.
| Data rows | 6 |
|---|---|
| Columns | 4 |
| Edge cases | Embedded comma, escaped quotes, multi-line field, empty field, leading and trailing spaces |
| Line endings | CRLF |
| Encoding | UTF-8 without BOM |
What to check
After your application has processed sample-csv-quoted-fields.csv, confirm that:
- Six records are imported, not seven: the line break in row 3 is inside a quoted field.
- The name in row 1 keeps its comma and row 2 keeps its quotation marks.
- Rows 4 and 6 show whether your importer distinguishes a missing value from an empty string.
How the file begins
The opening lines of sample-csv-quoted-fields.csv, exactly as they appear in the file.
id,name,comment,amount
1,"Abbott, Ava","Contains a comma, inside quotes",10.50
2,Noah Brennan,"She said ""hello"" and left",20.00
3,Mia Castillo,"First line
Second line of the same field",30.25
4,Liam Dalton,,40.00
5," Zoe Eklund ","Leading and trailing spaces are part of the value",50.75
6,Ethan Farrow,"",60.00
Preview
Shows the file contents.
Technical details
| File name | sample-csv-quoted-fields.csv |
|---|---|
| Format | CSV (Comma-separated values) |
| Extension | .csv |
| MIME type | text/csv |
| Size | 324 bytes (324 B) |
| Kind | Text |
| SHA-256 | 10abd64257b1afd45bbb9c836ca9adac683fa818b99fe9d08c0cad7b276d97b5 |
| Created | 2026-10-10 |
| Validation | Exact size, signature bytes and structure checked when the file was generated |
| Preview | Available on this page |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Spreadsheets |
Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-csv-quoted-fields.csv 'https://sampletestfiles.com/downloads/samples/sample-csv-quoted-fields.csv'
sha256sum sample-csv-quoted-fields.csv # Linux
shasum -a 256 sample-csv-quoted-fields.csv # macOSOn Windows, run Get-FileHash sample-csv-quoted-fields.csv -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
About CSV
Tabular data as plain text, one record per line. The universal import and export format.
Where it fits
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- QA testing
A ready-made set of ordinary and awkward files for exploratory testing and test plans.