file in abyss
Back to formats

Document

TXT Plain Text

Plain Text is a document format commonly identified by .txt, .text. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .txt, .text
MIME text/plain

Magic numbers

Analyze your file
offset 0 Plain Text leading signature
74 69 74 6C 65 3A
title:

Structure

  1. Text lines
  2. Optional metadata
  3. Line endings

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 74 69 74 6C 65 3A, 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("7469746c653a")
OFFSET = 0

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

Practical usage

Use cases

Plain Text 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 .txt / .text extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Plain Text can start with signatures such as 74 69 74 6C 65 3A, 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 TXT

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

01-blue-sky.txt
Type Sample
Small file
164 B
SHA-256 b4ef7c269237079163ffb2047223ccee7efdfe3317e9f2c941e8a9658ca7322d
Download
Doc

Flower Garden TXT

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

02-flower-garden.txt
Type Sample
Small file
252 B
SHA-256 4f930a8a4a98e9f60dd45685492ed5f269bed5779df51de835f4800fc8070ff0
Download
Doc

Navy Blue Sky TXT

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

03-navy-blue-sky.txt
Type Sample
Small file
266 B
SHA-256 56b479b44e4340cd4db9aa2772c1fbb48483217e0f9ed785a8d0cd2511f1d10b
Download
Doc

Nature of the Sky TXT

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

04-nature-sky.txt
Type Sample
Small file
302 B
SHA-256 13c9c17e777735a54d7ff404e6ef1c740d50cbbc073b26dfb6fa0a7eb5be8d12
Download
Doc

Sky Landscape TXT

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

05-sky-landscape.txt
Type Sample
Small file
400 B
SHA-256 3d3498c21f5f508ea2581aba77104c0de05dba37d0f419efc5b3d4a4a0b5ec51
Download
Doc

Starry Sky TXT

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

06-starry-sky.txt
Type Sample
Small file
306 B
SHA-256 d5ab2b30d3fc9dc2e0cdb6bb5e06de8e6741be30f3a6889cfe7900d6416c1c32
Download
Doc

Blue Night Sky TXT

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

07-blue-night-sky.txt
Type Sample
Small file
398 B
SHA-256 d3a6fc8972af9b1cad31d5657ff4e8632c509e906316d226621ebce3d0b79e3b
Download
Doc

Hibiscus Flower TXT

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

08-hibiscus-flower.txt
Type Sample
Small file
567 B
SHA-256 48177ae9a99604b1c63b6bc18a020bfecf0b3b43955bb4fa444ac885817b36ff
Download
Doc

Arctic Sky TXT

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

09-arctic-sky.txt
Type Sample
Small file
473 B
SHA-256 467cb5ad3ddb4094ad1b73ec6afeff908cd0f01054318532ff6a7230dd689a62
Download
Doc

Sunset Rays TXT

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

10-sunset-rays.txt
Type Sample
Small file
523 B
SHA-256 6b35d7b14f369167402135c26254c67f01d2c0cd3e154de7398d8b030aa0109a
Download
Doc

NASA Blue Marble TXT

NASA Blue Marble TXT is a Plain Text 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.txt
Type Sample
1.0 KB
SHA-256 9a5f65a9e7e5c69a1b0c66721d65dcacc3376c326454dd931a4724a0be3c7f87
Download

Frequently asked questions

What is the magic number (file signature) of Plain Text?

Plain Text files begin with the byte signature 74 69 74 6C 65 3A ("title:"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Plain Text?

The MIME type for Plain Text is text/plain.

What file extension does Plain Text use?

Plain Text files use the .txt, .text extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats