file in abyss
Back to formats

Document

MD Markdown

Markdown is a document format commonly identified by .md, .markdown. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .md, .markdown
MIME text/markdown

Magic numbers

Analyze your file
offset 0 Markdown leading signature
23 20
#

Structure

  1. Plain text
  2. Headings
  3. Paragraphs
  4. Lists
  5. Links

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 23 20, 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("2320")
OFFSET = 0

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

Practical usage

Use cases

Markdown 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 .md / .markdown extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Markdown can start with signatures such as 23 20, but related containers and damaged files may require additional validation.

Security notes

Document formats may include scripts, attachments, macros, or external references. Sandbox previews and conversions, and avoid opening untrusted files directly.

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
Doc

Blue Sky MD

Blue Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.md
Type Sample
Small file
135 B
SHA-256 e601110dd647a3e36a5066a3134ae6203cf137dafc0930c171d3becd6c2b08d0
Download
Doc

Flower Garden MD

Flower Garden MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.md
Type Sample
Small file
199 B
SHA-256 958f31e5bc3971ec7e64fcc6d462cddeb33b65a7d2e05c3936403964107ad21d
Download
Doc

Navy Blue Sky MD

Navy Blue Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.md
Type Sample
Small file
194 B
SHA-256 557cca18ab0d22632b3864bf6ed6c4bb6240bc27e04d8b16e8e94b6ef62f0413
Download
Doc

Nature of the Sky MD

Nature of the Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.md
Type Sample
Small file
195 B
SHA-256 7c772e89e19c32f13646aeb63be3f340758fc2b87b53d0c24bd53e0d09c229d3
Download
Doc

Sky Landscape MD

Sky Landscape MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.md
Type Sample
Small file
290 B
SHA-256 40c0f744371b70943b0dbad46bdf09a73daf9c298fc36b9fffad687a401c3c4c
Download
Doc

Starry Sky MD

Starry Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.md
Type Sample
Small file
195 B
SHA-256 edb76a5c7e82de5990d771696c4e4a49d72cfba7b348e46793edb1ea96d5ae21
Download
Doc

Blue Night Sky MD

Blue Night Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.md
Type Sample
Small file
243 B
SHA-256 84a83bff6547257be087824787d0108814161232f3ad0745fd723433cf56fd0c
Download
Doc

Hibiscus Flower MD

Hibiscus Flower MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.md
Type Sample
Small file
384 B
SHA-256 3edfe6b56fde0f49b507896a893cfdb6af542339336e173f1c1f08f6f1560861
Download
Doc

Arctic Sky MD

Arctic Sky MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.md
Type Sample
Small file
314 B
SHA-256 14000757d95cb6147b1977862f2002872ed6902ff9c9a3b2d330a30a28d1460b
Download
Doc

Sunset Rays MD

Sunset Rays MD is a Markdown sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

10-sunset-rays.md
Type Sample
Small file
338 B
SHA-256 631007f568fea9750956728b96f424cbd5a136f8e89677b7c0344e184b0edbcb
Download
Doc

NASA Blue Marble MD

NASA Blue Marble MD is a Markdown 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.md
Type Sample
Small file
664 B
SHA-256 6fc911149dd9d9ef1df0cfbe645a0e8b82b60cb73a1b580ff894a26d8d2f4da7
Download

Frequently asked questions

What is the magic number (file signature) of Markdown?

Markdown files begin with the byte signature 23 20 ("# "). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Markdown?

The MIME type for Markdown is text/markdown.

What file extension does Markdown use?

Markdown files use the .md, .markdown extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats