ASCIISTL

application/octet-stream

Safe

Magic Bytes

Offset: 0
73 72 63 64 6F 63 69 64 3A

The ASCII Standard Tessellation Language (STL) is a file format developed by 3D Systems for representing three-dimensional surface geometry using a mesh of triangles. It is primarily utilized in computer-aided design, rapid prototyping, and 3D printing software to describe the physical layout of solid objects. Although this ASCII representation is technically legacy compared to its binary counterpart, it remains widely supported across engineering platforms due to its human-readable nature and cross-platform compatibility.

Extension

.stl

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .stl files in Python

Python
def is_stl(file_path: str) -> bool:
    """Check if file is a valid STL by magic bytes."""
    signature = bytes([0x73, 0x72, 0x63, 0x64, 0x6F, 0x63, 0x69, 0x64, 0x3A])
    with open(file_path, "rb") as f:
        return f.read(9) == signature

How to validate .stl files in Node.js

Node.js
function isSTL(buffer: Buffer): boolean {
  const signature = Buffer.from([0x73, 0x72, 0x63, 0x64, 0x6F, 0x63, 0x69, 0x64, 0x3A]);
  return buffer.subarray(0, 9).equals(signature);
}
Go
func IsSTL(data []byte) bool {
    signature := []byte{0x73, 0x72, 0x63, 0x64, 0x6F, 0x63, 0x69, 0x64, 0x3A}
    if len(data) < 9 {
        return false
    }
    return bytes.Equal(data[:9], signature)
}

API Endpoint

GET /api/v1/stl
curl https://filesignature.org/api/v1/stl

Related Formats