Tom's Obvious Minimal Language is a data format commonly identified by .toml. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.
offset 0Tom's Obvious Minimal Language leading signature
74 69 74 6C 65 20 3D
title =
Structure
Key-value pairs
Tables
Arrays
Dotted keys
Caveats
Do not trust the extension alone. Check the MIME type, the first bytes such as 74 69 74 6C 65 20 3D, 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("7469746c65203d")
OFFSET = 0
def is_toml(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATURE
const SIGNATURE = [0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isToml(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}
package fileid
import "bytes"
var istomlSignature = []byte{0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d}
const istomlOffset = 0
func IsToml(b []byte) bool {
end := istomlOffset + len(istomlSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[istomlOffset:end], istomlSignature)
}
Tom's Obvious Minimal Language 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 .toml extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
Tom's Obvious Minimal Language can start with signatures such as 74 69 74 6C 65 20 3D, 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.
Blue Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Flower Garden TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Navy Blue Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Nature of the Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Sky Landscape TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Starry Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Blue Night Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Hibiscus Flower TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Arctic Sky TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
Sunset Rays TOML is a Tom's Obvious Minimal Language sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
NASA Blue Marble TOML is a Tom's Obvious Minimal Language sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
What is the magic number (file signature) of Tom's Obvious Minimal Language?
Tom's Obvious Minimal Language files begin with the byte signature 74 69 74 6C 65 20 3D ("title ="). Detect the format by reading these leading bytes rather than trusting the file extension alone.
What is the MIME type of Tom's Obvious Minimal Language?
The MIME type for Tom's Obvious Minimal Language is application/toml, text/toml.
What file extension does Tom's Obvious Minimal Language use?
Tom's Obvious Minimal Language files use the .toml extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.