file in abyss
Back to formats

Data

CSV Comma-Separated Values

Comma-Separated Values is a data format commonly identified by .csv. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .csv
MIME text/csv

Magic numbers

Analyze your file
offset 0 Comma-Separated Values leading signature
6E 61 6D 65
name

Structure

  1. Rows
  2. Fields
  3. Optional header
  4. Quoted values

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 6E 61 6D 65, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("6e616d65")
OFFSET = 0

def is_csv(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

Comma-Separated Values is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.

Common detection mistakes

  • The .csv extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Comma-Separated Values can start with signatures such as 6E 61 6D 65, but related containers and damaged files may require additional validation.

Security notes

Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Data

Nature Colors CSV

Nature Colors CSV is a Comma-Separated Values sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.

colors.csv
Type Sample
Small file
92 B
Generated CC0 1.0
SHA-256 1c9c8cd3d3388f7d601422bb14277c58fa793a60e5d016aa77d8103aa1390d07
Download
Data

Blue Sky CSV

Blue Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.csv
Type Sample
Small file
141 B
SHA-256 b8c6c6d1304a6df369a2b23d14b71290e241a44c112e45cf0b0318c8534bd0ba
Download
Data

Flower Garden CSV

Flower Garden CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.csv
Type Sample
Small file
293 B
SHA-256 82f01fead0843a36da2ed3529a31ef75daa64cef329b52fed148fb560102d7f3
Download
Data

Navy Blue Sky CSV

Navy Blue Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.csv
Type Sample
Small file
396 B
SHA-256 77e2d7b1e7b2cf616ba094d5993cb6249cf2a66427c86daa6db305d64422e4bc
Download
Data

Nature of the Sky CSV

Nature of the Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.csv
Type Sample
Small file
483 B
SHA-256 8fe507787be70647e108aa5264392d433c495732c1e6ff37602e3514551fd1e1
Download
Data

Sky Landscape CSV

Sky Landscape CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.csv
Type Sample
Small file
679 B
SHA-256 3bf660b0d93762473747cbdf41c7721f9700abaa589461d0bcd4323a048fcdec
Download
Data

Starry Sky CSV

Starry Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.csv
Type Sample
Small file
705 B
SHA-256 ae74b42ec074812ec903967974fe7e411cbb2f18154f477727f570a0c41393f2
Download
Data

Blue Night Sky CSV

Blue Night Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.csv
Type Sample
Small file
774 B
SHA-256 281a26f3126fbcaa8b310622107ae46290689eb1065431cc301d7265a34d7523
Download
Data

Hibiscus Flower CSV

Hibiscus Flower CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.csv
Type Sample
1.1 KB
SHA-256 895cd4d9e139546d63cb8e7607c65afd0d5f0cf240b3c237747fa32a5da5c472
Download
Data

Arctic Sky CSV

Arctic Sky CSV is a Comma-Separated Values sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.csv
Type Sample
1.0 KB
SHA-256 7de222dee3046df0502bfa7e9cbf40458ca1753eba204ca7be66a7f0044f2969
Download
Data

NASA Blue Marble CSV

NASA Blue Marble CSV is a Comma-Separated Values sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.csv
Type Sample
1.8 KB
SHA-256 ad9051e1e7e8aa2231b706e740a421d39b158c8900c604a0fd293d52e103af92
Download

Frequently asked questions

What is the magic number (file signature) of Comma-Separated Values?

Comma-Separated Values files begin with the byte signature 6E 61 6D 65 ("name"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Comma-Separated Values?

The MIME type for Comma-Separated Values is text/csv.

What file extension does Comma-Separated Values use?

Comma-Separated Values files use the .csv extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats