Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

STL (STereoLithography) File Format, Binary

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name STL (STereoLithography) File Format, Binary.

The binary representation of the STL (STereoLithography) file format is a simple, openly documented format for describing the surface of an object as a triangular mesh. Since its introduction in the late 1980s, STL has become a de facto standard for rapid prototyping and 3D printing. For practical use, since its files are more compact, the binary variant is more common.

See the format description for STL_family for general background and context for the STL format. This document focuses on details applicable only to the binary variant of STL.

An STL_binary file consists of an 80 character header that can be used as a comment; the number of triangles as a 32-bit little-endian integer; and 50 bytes for each triangular facet. A facet is defined in twelve 32-bit floating-point numbers (little-endian): three for the unit normal vector, and three for the (X,Y,Z) coordinates of each vertex. For each triangle, these 48 bytes are followed by a 2-byte unsigned integer, apparently described in the original documentation as the attribute byte count. According to the Wikipedia entry for the STL file format, the value for the attribute byte count "should be zero because most software does not understand anything else." The syntax of the binary variant is described in succinct tabular form at StL Binary Format at; it also indicates that the attribute byte count should be zero. Formal machine-readable specifications of the STL_binary syntax are available at stl grammar, in an XML-based form compatible with Synalyze It! and .stl file format, in the Kaitai Struct language.

The original specification for STL had no support for color; however, attempts have been made to extend the binary variant of STL to specify colors for triangles. The Wikipedia entry for the STL file format has a section with heading Color in binary STL. It describes two conventions that employ the two attribute byte count bytes at the end of every triangle to encode the color for the triangle. Unfortunately, the convention reported as in use in VisCAM and SolidView software uses a different order for the red, blue, and green color components than the convention reported as used by the Materialise Magics 3D printing products and services. There is no way to determine automatically which convention has been used. Judging from questions asked on online forums related to 3D printing, color in STL files is a source of frustration. Responses usually recommend using a format that has a standardized method for encoding colors. See Useful References below for a selection of other resources that mention the two options for color support in STL_binary.

Compared with more recent formats for 3D models, STL has limited functionality. See STL_family for information on shortcomings of the STL format that apply to both variants of the STL file format.

Production phase See STL_family.
Relationship to other formats
    Subtype of STL_family, STL (STereoLithography) File Format Family
    Affinity to STL_ASCII, STL (STereoLithography) File Format, ASCII

Local use Explanation of format description terms

LC experience or existing holdings See STL_family.
LC preference See STL_family.

Sustainability factors Explanation of format description terms


The STL file format was openly documented by its originator, Charles Hull of 3D Systems, Inc. Although STL can be considered proprietary, 3D Systems has encouraged its use. The format has not been maintained through a formal governance structure.


Originally documented in StereoLithography Interface Specification in 1988 by 3D Systems, Inc. The compilers of this resource have been unable to locate a copy of the original specification and have relied on other descriptions of the format. Listed below (see Useful References) are a number of sources with information about the format. Comments welcome.


See STL_family on adoption of the STL format including both variants.

Because many STL files would be unmanageably large in the ASCII variant of the format, most use of STL is in STL_binary. However most software that can handle STL files can import or render models in both STL variants.

In 2018, Working Group 17 for the Digital Imaging and Communications in Medicine (DICOM) standard published Supplement 205, DICOM Encapsulation of STL Models for 3D Manufacturing, which allows for the wrapping of a binary STL file in the standard DICOM container used for the communication and management of medical imaging information and related data. The supplement states, "The goal of encapsulating a Stereolithography (STL) 3D manufacturing model file inside a DICOM instance rather than transforming the data into a different representation is to facilitate preservation of the STL file in the exact form that it is used with extant manufacturing devices, while at the same time unambiguously associating it with the patient for whose care the model was created and the images from which the model was derived."

    Licensing and patents There are no concerns about patents or licensing associated with the STL format.

Files in the STL_binary format cannot be usefully studied or manipulated with a text editor. However, software to read and write its very simple structure would be straightforward to develop, for example, by taking advantage of the formal specification of the .stl file format in the Kaitai Struct language, which can be used to generate a parsing libary in a variety of programming languages.

Unfortunately, as shown in Analysis of STL files by M. Szilvśi-Nagy and Gy. Mátyási in 2003, the surface tessellation performed in CAD modelling software "frequently ends with errors in the [STL] data structure as gaps and holes leading to open loops in the cross-sections that cannot be manufactured as layers." Although an STL_binary file may be easy to read or manipulate as a sequence of numbers, that does not mean that it can be used for 3D printing without using a more sophisticated software tool to check the file and repair it if needed. There are many tools that offer to repair STL files; see 18 Best STL Repair Software Tools in 2019.

Self-documentation The format provides no standard support for descriptive metadata. The format begins with an 80 character line that is sometimes used for a textual description of the model and its context.
External dependencies None
Technical protection considerations None

Quality and functionality factors Explanation of format description terms

3D Model Geometry See STL_family.
3D Model Appearance The documented specification for STL has no support for color, texture, or other appearance characteristics. As described in Color in binary STL, two incompatible extensions to the format are in use to attach colors to triangular facets. See also Description above and Useful References below.
3D Model Scene See STL_family.
3D Model Animation See STL_family.

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension stl
This file extension is found in practice, and listed in many file format resources. Is also used for the ASCII variant of STL.
Internet Media Type model/stl
model/stl was registered as an Internet media type in March 2018 with IANA on behalf of the Digital Imaging and Communications in Medicine (DICOM) Standards Committee in preparation of Supplement 205: DICOM Encapsulation of STL Models for 3D Manufacturing. See Prior to that, application/sla had been used by Wolfram for Mathematica and other products. Both media types apply to both ASCII and binary versions of STL.
Pronom PUID fmt/865
Wikidata Title ID Q1238229
See Covers ASCII and binary variants of STL.

Notes Explanation of format description terms

General See STL_family.
History See STL_family.

Format specifications Explanation of format description terms

Useful references


Last Updated: 09/18/2019