Categories About Us Contact Us Become a Member

What Is an STL File? The Triangle Mesh Behind Every 3D Print

An STL file holds triangles and almost nothing else. Jump to your question below, or work through it in order.

By Neeraj Singh ~29 min Updated Oct 2026 Checked against PRONOM, the Library of Congress and Stratasys
Short answer

An STL file is a 3D shape stored as a list of triangles. Every triangle holds three corner points and a direction. Lay enough of them edge to edge and that collection of triangular facets wraps the exterior surface of an object, which is all that 3D printers need.

What an STL leaves out is the surprising part. No units, no color, no materials, no layers and no record of how the shape was built. Most of what goes wrong with an STL traces straight back to one of those gaps.

Every slicer opens an STL, and the common ones cost nothing. Microsoft no longer ships anything on Windows that does, which section 6 dates precisely.

1 What is an STL file? A bag of triangles, and the 1987 printer it was written for

STL came out of stereolithography, the first commercial 3D printing process. 3D Systems released the STL file format in 1987 to feed geometry to its lasers. It was first documented by 3D Systems in the StereoLithography Interface Specification in July 1988.

Those machines were sold for rapid prototyping, and STL became the handoff format in additive manufacturing workflows that it still is. Nothing ever voted it the standard for 3D printing. It simply arrived first and stayed.

Chuck Hull, who invented the process and founded the company, treated STL as short for stereolithography. Standard Triangle Language and Standard Tessellation Language are backronyms read into the letters later. Neither ever appeared in any specification.

An STL file describes the surface geometry of one closed object and stops there. It stores no metadata at all: no part name, no unit, no author and no record of a design step. Wikipedia puts the stability plainly: the format remained relatively unchanged for 22 years, until replacements were first proposed in 2009.

That simplicity is why STL survived. A program needs about an afternoon of work to read one, so viewers, slicing software, quoting systems and repair tools all handle STL files natively.

Broad compatibility followed from that, and it is the entire reason an STL opens anywhere. Formats designed since carry units, color, materials and assembly trees. STL remains the default export almost everywhere.

An STL stores a surface, not a solid. The word solid appears in every text STL file, and no part of the format can check whether the triangles actually seal a volume.

STL file format at a glance

STL file format at a glance
STL file extension
.stl, sometimes written .STL
Stands for
Stereolithography
What an STL is
A 3D surface stored as triangles
Developed by
3D Systems, 1987
Specification
StereoLithography Interface Specification, July 1988, second edition October 1989
Two encodings
Binary and ASCII, both ending .stl
Binary cost
50 bytes per triangle, plus 84 bytes of file overhead
Byte order
Little endian
Media type
model/stl, registered with IANA in March 2018
Format registry
PRONOM fmt/865 for binary STL, x-fmt/108 for text
Carries units
No. The numbers are bare
Carries color
No, except by two extensions that disagree

Came here from a CAD drawing rather than a printer? IGS files send surfaces between CAD programs, and DDS files hold the textures that dress a 3D model. Both answer a different half of the same job.

Your CAD program knows a cylinder is a cylinder. An STL file knows a few hundred flat triangles that happen to be arranged in a ring. Export is one-way.

2 Triangles, not geometry What an STL file keeps, and what export throws away

A CAD file holds instructions. Draw a circle 12 mm across, pull it up 40 mm, round the top edge by 2 mm. Change any number and the shape rebuilds. That chain of steps is the design, and CAD software calls it parametric geometry.

An STL export runs every instruction once, measures that finished surface, chops it into a triangular mesh and keeps nothing but geometric surface data. Your circle is gone. What remains is flat faces that look round from a distance.

What an STL keeps

The shape, measured. Corner points, and which three make a face.

What an STL loses

Every decision behind it. Dimensions, parametric features, order, units.

This is why an imported STL frustrates people in CAD software. Open one in Fusion or FreeCAD and you get triangles you can push around, not editable geometry. Native CAD files keep feature history and design intent, and an exchange format like STEP keeps precise surfaces. An STL keeps none of it, so moving a hole from 6 mm to 8 mm means going back to the file that produced the STL.

What one triangle of an STL file holds. Three corner points carry nine numbers between them, as X, Y and Z for every corner. A fourth group of three numbers is the facet normal, a short arrow that should point away from the inside of the object. Two spare bytes finish the record, meant to hold zero. The corner order matters as much as the arrow: listed counter-clockwise when seen from outside, the three corners describe the same outward direction the arrow does, which is why the format states the rule twice. Programs that write 0 0 0 for the arrow rely on the corner order alone, and programs that trust the arrow rely on it being right, so a file disagreeing with itself can be drawn inside out by one program and correctly by another.
Nine numbers for the shape, three for the direction, and two the format never defined.

Inside one triangle of an STL file

Every triangle in an STL carries four pieces of information. Three of them are vertices, which are its corner points. The fourth is a facet normal, a normal vector saying which way that face points.

The normal is supposed to be a unit vector pointing outward from the solid object. The three corners are supposed to be listed counter-clockwise when seen from outside, which is the right-hand rule. Those two rules say the same thing twice, deliberately.

Saying it twice turned out to matter, because writers treat the normal casually. Plenty of programs set it to 0 0 0 and leave the reader to work the direction out from vertex order. Some readers trust the stored normal instead.

When a file disagrees with itself, two programs can draw the same STL inside out from one another. The specification is blunt about the fix: to be entirely portable, an STL should both provide the facet normal and order the vertices appropriately.

A cube needs twelve triangles, not six. Six square faces, two triangles apiece. That twelve is the floor for any box-shaped STL, and it is a quick way to sanity-check any file claiming to hold a simple part.

Wondering why the triangles are visible on the print? Section 9 covers export tolerance, with the numbers Stratasys publishes for every major CAD program.

Both variants of STL hold identical triangles. One is readable text and one is fixed-width bytes. The test everybody repeats for telling them apart is wrong.

3 Binary STL against ASCII STL Two encodings, one extension, and a detection trap

An ASCII STL spells the triangles out in plain text. Open one in Notepad and the first word is solid, then one block per triangle, with the meaning of every line beside it here.

One triangle of an ASCII STL file, line by line.
LineWhat it says
solid cubeStart of the surface, with an optional name after it
facet normal 0.0 0.0 1.0This face points straight up. One triangle begins
outer loopThe three corners follow
vertex 0.0 0.0 10.0First corner, as X then Y then Z
vertex 10.0 0.0 10.0Second corner
vertex 0.0 10.0 10.0Third corner, and the order matters
endloopCorners finished
endfacetTriangle finished. The next one starts here
endsolid cubeEnd of the surface. Nothing follows it

Numbers appear in exponent form, written like 2.648000e-002. The specification allows whitespace anywhere in the file except within numbers or words. That tolerance is handy for people reading an STL and useless for everything else.

A binary STL holds the same nine coordinates plus the normal as twelve four-byte numbers, with two spare bytes on the end. Fifty bytes per triangle, every triangle, no exceptions. Binary is what nearly every program writes, because the text version runs four to five times larger for the same mesh.

How a binary STL file is laid out

Every binary STL file, byte for byte.
OffsetSizeWhat sits there
080 bytesHeader. Free text, no structure, usually ignored
804 bytesTriangle count, little endian unsigned integer
8412 bytesFacet normal, three 32-bit floats
9612 bytesFirst corner, three vertex coordinates as 32-bit floats
10812 bytesSecond corner
12012 bytesThird corner
1322 bytesAttribute byte count. Meant to be zero, and section 10 is what happened instead
13450 bytesNext triangle, and so on to the end
How a binary STL file is sized, and the test that follows from it. The file opens with 80 bytes of free text that nothing reads, then a 4-byte triangle count, then one 50-byte record per triangle to the end. Because every record is the same length, the total size is fixed by the count: 84 bytes of overhead plus 50 times the number of triangles, with no other possibility. That makes the arithmetic a reliable test of whether a file is binary. The usual test, reading the first five characters and calling the file text if they spell solid, fails on SolidWorks exports, because SolidWorks writes the word solid into the free-text header of a binary STL file.
The size of a binary STL is a sum, not a guess. The first word proves nothing.

The STL detection test everybody repeats, and why it fails

Ask how to tell binary STL files from text ones and you will be told to look at the first five characters. If the file starts with solid it is text, and otherwise it is binary. Parser write-ups say it, and the national format registries record solid as the magic number for the text variant.

It does not hold. The 80-byte header on a binary STL is free text, and SolidWorks fills it with a line beginning solid. Wikipedia warns that binary STL files should never begin with 'solid' because that may lead some software to assume that this is an ASCII STL file.

That is exactly what happened. The meshio library read those SolidWorks exports as text and failed on them, while Paraview, Blender and MeshLab handled them. The bug was reported, confirmed and fixed.

Do the arithmetic instead. Read the 4-byte count at offset 80, call it n. If the file is exactly 84 + 50n bytes long, the STL is binary. The size of a binary STL is fixed by its triangle count, so this test cannot be fooled by a header.

Run it the other way and the same sum sizes your file before you export. Two hundred thousand triangles is 10,000,084 bytes, near enough 10 MB. A million triangles is 50 MB. Nothing about the shape changes that, only the count.

Never judge an STL file by its extension either. Both encodings use .stl, and four unrelated file types claim the same three letters, from SuperTux game levels to Windows certificate trust lists. Section 11 lists them.

Nothing here costs money. Every slicer reads STL files, and the three best free mesh editors run on Windows, macOS and Linux alike. Only Windows itself has stopped helping.

4 What opens an STL file Free first, because free covers every job here

What programs can open STL files depends on which of three jobs you came for. Looking at an STL needs a viewer. Printing one needs slicing software, which cuts those triangles into layers and writes machine instructions.

Material, layer height, print orientation and supports are all set during print preparation rather than in the file. Fixing or reshaping an STL needs a mesh editor, and plenty of programs do two of the three.

Free software that opens STL files

Free ways to open an STL file, and what every one is for.
SoftwareRuns onWhy select it
UltiMaker CuraWindows, Mac, LinuxThe slicer most people start with. Opens an STL and writes G-code
PrusaSlicerWindows, Mac, LinuxReads STL and 3MF. Grew out of the open source Slic3r
Bambu Studio, OrcaSlicerWindows, Mac, LinuxNewer slicers, both free, both STL and 3MF
BlenderWindows, Mac, LinuxFull modeling, plus a 3D Print Toolbox that checks a mesh
MeshLabWindows, Mac, LinuxThe repair tool. Fills holes, fixes winding, cuts triangle count
FreeCADWindows, Mac, LinuxMeasures an STL, and attempts a solid from its mesh
Apple PreviewMacAlready installed. Double-click an STL and it opens
Online 3D ViewerAny browserNothing to install, and nothing uploaded anywhere
Autodesk FusionWindows, MacFree for personal use, and reads both STL encodings
Just want to look at it?

Online 3D Viewer in a browser, or Preview if you are on a Mac.

Want to print it?

Your printer maker's slicer. Cura and PrusaSlicer read any STL.

Paid software that reads STL files

Engineering packages read STL files too, and they are worth naming because the output differs. These are the programs that produce the CAD files an STL is usually exported from.

SolidWorks, Rhinoceros 3D and Solid Edge all import and export STL. All three let you set the export tolerance by hand. Materialise Magics and Autodesk Netfabb exist to repair STL files in bulk for production, which is work the free tools do one file at a time.

A text editor tells you something useful in two seconds. Open your STL in Notepad. Readable lines starting facet normal mean a text STL. A screen of garbage means binary, which is normal and correct. An empty file or a half-finished last line means the transfer stopped.

Is the computer at fault rather than the model? A double-click follows the file association list, and a missing entry for .stl explains more complaints than a bad mesh does. Our Windows error guides and macOS fixes cover resetting it.

On Windows the usual answer is that nothing is installed to open STL files, because Microsoft removed what used to be there. Nothing is wrong with your triangles.

5 Why your STL file will not open Four causes, and only one of them is the file

An STL is about as simple as files get, so genuine damage is rare. Work down this list in order, because item one accounts for most reports and costs nothing to rule out.

Four reasons an STL file refuses to open

Windows has nothing registered for .stl Commonest by far. A current Windows install ships no STL viewer at all, so a double-click sends you to the Store, where Microsoft's own viewer is no longer listed. Install any free slicer and the problem goes.
It is not an STL file Four unrelated formats claim this extension, and a renamed download claims it too. Open it in a text editor. No facet normal lines and no sensible triangle count at offset 80 means you are holding something else.
The transfer stopped partway The only cause that is really the file, and the one case where arithmetic settles it. A triangle count fixes the length of a binary STL, so any other size means the file is short. No repair tool invents the missing triangles.
It opens, and the window looks empty Not a failure to open. The model is off-screen or microscopic, because STL files carry no unit and your software guessed. Zoom to fit, then read section 7.

Notice that three of those four sit outside your STL file. Before blaming your model, check its size against 84 + 50n and open it in a text editor. If both look right, the triangles arrived intact and the fault is downstream.

Be careful what you buy to “repair” STL files. Genuine mesh repair costs nothing in MeshLab or Blender, and every slicer attempts it on import. Section 8 walks through the rest. Products advertising STL recovery for a fee are usually viewers with a payment screen, and nothing rebuilds triangles that never finished copying.

Almost every guide to opening STL files names Windows 3D Viewer, 3D Builder, Meshmixer or the free Netfabb service. None of the four can be installed any more, and Microsoft and Autodesk published the dates.

6 The free STL tools that are disappearing Four years of withdrawals, and what to use instead

Between 2021 and the middle of 2026, Microsoft and Autodesk stepped out of free 3D tooling altogether. Advice written before that has not caught up, so searches for how to open STL files still point at software nobody can download any more. Here is the sequence, with dates.

When every free STL tool was withdrawn

The withdrawal of free STL tooling, in order.
DateToolWhat happened
September 2021Autodesk MeshmixerAutodesk: no longer in development and will not be supported. Users sent to Fusion
2024Microsoft 3D BuilderDropped from the Microsoft Store. Still runs where it is already installed
August 2024Microsoft Paint 3DDeprecated
4 November 2024Microsoft Paint 3DRemoved from the Microsoft Store
February 2026Microsoft 3D ViewerDeprecated. The last thing in Windows that opened an STL by double-click
1 July 2026Microsoft 3D ViewerRemoved from the Microsoft Store. Already past. Nobody can download it now
OngoingNetfabb free online repairService closed. Tutorials still link to it. The desktop version is paid

Microsoft records it on its own deprecated-features page in the past tense, and that entry carries a second surprise for anybody still looking for 3D Viewer in Windows 11.

"3D Viewer was deprecated in February 2026 and was removed from the Microsoft Store on July 1, 2026. Existing installations of 3D Viewer will continue to work, but the app is no longer available for download from the Microsoft Store. 3D Viewer was preinstalled on some Windows 10 devices, but wasn't preinstalled on Windows 11 devices."
Microsoft, Resources for deprecated features in the Windows client, updated 23 September 2026

The last sentence is the one worth reading twice. Windows 11 never shipped 3D Viewer at all, so a large share of the people told to use it never had it. Microsoft's one suggested replacement for viewing 3D content is Babylon.js Sandbox, which is a web page rather than something on your computer.

What to install instead of 3D Viewer

The gap is easy to fill, and the replacements are better maintained than the tools they stand in for. Blender and MeshLab are both free, both open source and both actively developed.

Between them they cover viewing, measuring, repairing and reducing STL files. Any free slicer covers viewing and printing. Nothing changed on a Mac, where Preview has read an STL out of the box throughout.

Reading an old guide?

Check its date. Anything naming 3D Viewer was written before 2026.

Want one install?

Blender. It views, measures, repairs and exports an STL.

Meshmixer and 3D Builder still work. Neither has been uninstalled from anybody's machine, and both still open and repair STL files. What you lose is updates, support and any way of installing either one again, which matters the day you change computers.

An STL file records the number 25 and never says whether that means 25 millimeters, 25 inches or 25 of anything else. Every wrong-size print on every forum ends here.

7 The unit an STL file does not have Why your part came out 25.4 times too small

Wikipedia states it in one line: STL files contain no scale information, and the units are arbitrary. There is no field for it, no header entry and no convention, which can cause scale errors nobody sees until the print comes off the bed. Your coordinates are bare numbers, and whatever reads them has to assume something.

Nearly every slicer assumes millimeters. CAD programs do not. Draw in inches, export to STL and those numbers carry across untouched, so a 2 inch bracket becomes a 2 millimeter bracket. Blender measures in meters by default, and surprises people in reverse.

How to read the scale ratio you got

Ratios name the mistake. Measure your part in the slicer and compare it with what you drew. That factor names the unit your STL file was written in.

What the size ratio tells you about the STL file.
Your part isThe STL was drawn inFix
25.4× too smallInches, read as millimetersScale up 2540%, or set the export units to mm
25.4× too bigMillimeters, read as inchesScale down to 3.937%
1000× too smallMeters, read as millimetersScale up 100000%. Usually a Blender export
10× too smallCentimeters, read as millimetersScale up 1000%
Right size, wrong placeCorrectly, but far from the originCenter the model on the bed

MeshCAM's own documentation puts the first row best. When a part arrives the wrong size, it's usually off by a factor of 25.4, a clear tipoff that it's an inch/mm problem.

The reason it gives is that the STL format provides no information about the units or scale. A SketchUp forum answer is shorter still: STL files are unit-less.

How to stop STL unit errors happening again

1 Set the model units before you export. Work in millimeters in your CAD program if the part is going to a printer. Changing it later is a patch, and your next export repeats the fault.
2 Find the units option in your export dialog. Most CAD programs have one, buried behind an Options button on the STL export screen. Set it to millimeters and it stays set.
3 Put a known dimension in the file name. Writing bracket-80mm.stl costs nothing and tells whoever opens it what to expect, which no STL file ever will.
4 Measure once in the slicer, every time. Check one dimension you know against your bounding box before printing. It catches unit faults and a bad export together.

Send 3MF when the far end accepts it. A 3MF file records its unit, so your model arrives at the size you drew. That alone settles the commonest STL complaint there is, and section 11 covers what else 3MF carries.

Every edge in a printable STL carries exactly two triangles. Break that rule anywhere and your slicer stops being able to tell inside from outside.

8 Watertight, manifold and repairing an STL file One rule, four ways to break it, and a free fix

Slicing works by cutting your model at hundreds of heights and asking, at every point on every layer, whether that point is inside the part. Answering needs a sealed surface.

Wikipedia sets out the requirement exactly. An STL surface must be closed (no holes or reversed vector normal) and connected. Every edge is shared by exactly two faces, and the surface is not self-intersecting.

Read that as four separate promises. Nothing missing. Nothing inside out. Every edge used twice, never once and never three times. No triangle passing through another. A mesh keeping all four is called watertight or manifold, and slicers use the words interchangeably.

The one rule a printable STL mesh must keep, and four ways it fails. In a sound mesh every edge is shared by exactly two triangles, with nothing missing, nothing inside out and nothing overlapping, so the surface seals a volume and a slicer can always tell inside from outside. A hole leaves an edge with only one triangle on it and the surface stops there. A flipped triangle has its corners wound the wrong way, so one face reports its outside as inside. An internal wall left by a Boolean operation puts three triangles on one edge, which gives the slicer two answers for the same point. A loose shell or two arms of the model passing through one another breaks the rule without looking broken.
Count the triangles on every edge. Two is the only right answer.

The STL edge rule, and the four ways it breaks

Spatial, whose geometry software is licensed into commercial repair and print-preparation tools, lists the defects it sees in real STL files like this.

"misaligned edges, holes, floating parts, overlaps, double faces, and open edges"
Spatial, STL file format glossary entry

Every item on that list is the same rule failing in a different place, and the tell is always an edge carrying too few triangles or too many.

A hole, or an open edge One edge with a single triangle on it. The surface stops there. Commonest in scanned meshes and in models built from separate pieces that never quite met.
A flipped triangle Corners wound the wrong way, so one face reports its outside as inside. Flipped normals show as a dark patch in your viewer, and your slicer tries to fill the air beside it.
Three triangles on one edge An internal wall left behind by a Boolean operation. Your mesh looks sealed from outside, and your slicer finds two answers for one point.
Loose shells and self-intersection A stray fragment floating inside your part, or two arms of your model passing through one another. Both pass casual inspection and both break slicing.

Repairing an STL mesh, step by step

1 Let the slicer try first. Cura, PrusaSlicer and Bambu Studio all repair small defects on import without telling you. If that preview slices cleanly and your part is sound, there is nothing left to do.
2 Count the defects before fixing any. Blender's 3D Print Toolbox reports non-manifold edges, flipped faces, loose parts and intersections as numbers. MeshLab does the same. A file with three bad edges wants different treatment from one with nine thousand.
3 Delete the floating parts. Separate your mesh by connected piece and throw away anything that is not your model. This alone fixes a surprising share of scanned STL files.
4 Recalculate the normals outward, in one pass. Never flip faces by hand. Both Blender and MeshLab will rewind every triangle consistently, which settles flipped faces and the normal-against-winding disagreement together.
5 Fill the holes last. Hole filling adds triangles that were never in the design, so do it after the easy wins and look at what it added. A patch across a 2 mm gap is fine. A patch across an open end is a guess.
6 Measure the result, then export binary. Check volume and bounding box against what you expected. A repair that changed volume changed your part.

Repair treats the symptom. If an STL file came out of a CAD program broken, export tolerance or your model is the cause. The next export arrives broken too. Fix it upstream and the repair step disappears.

Gaps in a CAD surface file instead? That is a different fault with a different cure, and the IGS file format is where it lives. Surfaces arrive there with gaps that never joined, which is stitching rather than mesh repair.

Your print is exactly as smooth as the STL file, and never smoother. The export dialog decides that, and most people never open it.

9 Why your STL curves look like polygons Export tolerance, with the numbers CAD makers publish

Flat triangles cannot describe a curve. Wikipedia says so directly: it is not possible to use triangles to perfectly represent curved surfaces. Stratasys names the visible result faceting. Every round face in an STL is a ring of chords pretending, and how closely it pretends is a setting.

Stratasys states the consequence bluntly. You cannot build the model smoother than the STL file. And if the STL is coarse and faceted then the physical 3D printed model will be coarse and faceted as well. Faceted circles are not a printer fault. They were decided at export.

What the two STL export settings mean

Every STL export dialog offers some version of the same pair. Deviation, sometimes called tolerance or chord height, is the largest allowed distance between the real surface and the triangle standing in for it.

Angle caps how far the surface may turn between one triangle and the next. Siemens calls the first one the maximum distance allowed between the surface of the original design and the tessellated surface, which is exactly what it is.

Tighten either one and mesh resolution rises, which improves the surface but increases file size at 50 bytes a triangle. Loosen either one and flat spots appear, because flat triangles are all an STL has for approximating curved surfaces. The published settings sit closer to the tight end than most default presets.

STL export tolerances, as Stratasys publishes them per program.
CAD programSettingValue
SolidWorksDeviation and angle0.01 mm and 5 degrees
Siemens NXTriangle and adjacency tolerance0.015 mm for both
CATIAMaximum segmentation0.015 mm
Solid EdgeTolerance0.0254 mm for FDM, 0.015 mm for PolyJet
Rhinoceros 3DToleranceUnder half the printer resolution. 0.01 mm suits a 0.03 mm machine

That Solid Edge figure is worth a second look. 0.0254 mm is one thousandth of an inch, exactly. A format with no units still carries inch thinking in the numbers people set. That is a small joke at the expense of everyone caught by the 25.4 in section 7.

Finding an STL export setting that is good enough

The Rhino rule generalizes well: set the deviation below half the resolution your machine can actually hit. A 0.4 mm nozzle laying 0.2 mm layers cannot show you a 0.01 mm chord error, so spending triangles on it buys nothing but file size. Fine resin printing is the case where tight settings earn their keep.

Too coarse

Flat spots on round faces. Visible on the print, and unfixable later.

Too fine

A 200 MB STL that slices slowly and prints the same as a 20 MB one.

You can reduce a heavy STL after the fact. MeshLab and Blender both decimate a mesh, cutting triangle count while holding the shape, which is the right move for a scanned mesh carrying millions of triangles. Re-exporting from CAD at a sane tolerance is better still, because reduction can never recover detail the first export already discarded.

The two spare bytes on every triangle were claimed twice, by companies that put red and blue at opposite ends of them. Nothing in an STL file says which claim yours follows.

10 The two STL color extensions that disagree Where color hides, and why it rarely survives

An STL does not store color or texture in the format as documented, and the Library of Congress states that flatly.

"The documented specification for STL has no support for color, texture, or other appearance characteristics."
Library of Congress, STL (STereoLithography) File Format, Binary, updated 25 February 2025

Standard STL carries no color data of any kind. What an STL does have is two spare bytes at the end of every triangle, labeled the attribute byte count and meant to hold zero.

Two companies filled them in. Sixteen bits is enough for five bits of red, five of green, five of blue and one flag, so both schemes pack color into exactly that. Then they chose opposite bit orders.

The two color extensions reading the same two bytes in opposite orders. Every triangle in a binary STL file ends with two spare bytes called the attribute byte count, meant to hold zero. Sixteen bits fits five bits of red, five of green, five of blue and one flag, and two companies filled them in that way independently. VisCAM and SolidView put blue in the lowest five bits and red in the highest, and set the top bit to mean the color is valid. Materialise Magics put red in the lowest five bits and blue in the highest, and clears the top bit to mean the triangle carries its own color. Green sits in the middle either way, so a file read by the wrong scheme keeps its greens and swaps red for blue. No field anywhere in the file says which scheme was used.
Same sixteen bits, opposite ends. Green survives and the rest trades places.

How the two STL color schemes use the same two bytes

The same two bytes, read by the two STL color extensions.
BitsVisCAM and SolidViewMaterialise Magics
0 to 4Blue, 0 to 31Red, 0 to 31
5 to 9Green, 0 to 31Green, 0 to 31
10 to 14Red, 0 to 31Blue, 0 to 31
15Set means this color is validClear means this triangle has its own color

Only the ends move. Green holds bits 5 to 9 in both schemes. Bits 0 to 4 carry blue in one and red in the other, and bit 15 means opposite things.

Green sitting in the middle either way is what makes the failure so quiet. A Materialise file read as a VisCAM one keeps its greens and swaps red for blue, so your model looks almost right and is wrong. The flag bit is inverted too, so a reader can decide a colored triangle has no color at all.

Materialise also uses the 80-byte header, which is otherwise free text. A Magics file writes the string COLOR= there, followed by four bytes of red, green, blue and alpha as values from 0 to 255.

That sets a default color for the entire model. An optional MATERIAL= entry follows with three more 4-byte colors, for diffuse, specular and ambient light.

There is no version field and no identifying marker. Reading color out of an STL file means knowing which program wrote it, and no STL file records that. Wikipedia simply notes the two are incompatible.

What to send instead of an STL when color matters

Send 3MF, or OBJ. Both carry color data properly and both are read by current slicers. Neither asks you to guess a bit order. An STL works best where color never mattered. A 3MF file also carries units and multiple parts, which solves section 7 at the same time.

Color in an STL

Two schemes, no marker. It usually arrives wrong or stripped.

Color in a 3MF

Defined once, in XML. Materials and multiple parts too.

If your STL file arrived gray, nothing was lost. The color almost certainly never traveled, because most exporters write zero into those two bytes and most readers ignore them. Ask the sender for a 3MF rather than hunting for color that is not in the file.

The text variant of STL has a registered byte signature. The binary variant has none. Its length is fixed by a number at a known offset, and the registry explains why a signature is still impossible.

11 STL format and structure Specification, registry records and the other claimants

STL file specification and registration

3D Systems documented STL openly and then stopped maintaining it. The Library of Congress records the format as openly documented by its originator, while noting it has no formal governance.

It adds that its own compilers have been unable to locate a copy of the original specification. Everything structural below is drawn from the registry records and from the reference documentation they cite.

What is on record for STL, from PRONOM, the Library of Congress and IANA.
ItemValue
Extension.stl
Stands forStereolithography
Kind3D surface mesh
Developer3D Systems, credited to Charles Hull
First release1987
SpecificationStereoLithography Interface Specification, July 1988, second edition October 1989
EncodingsBinary and ASCII, both using .stl
Binary header80 bytes, free text, no structure
Binary count field4-byte little-endian unsigned integer at offset 80
Binary record size50 bytes per triangle: 12 normal, 36 vertices, 2 attribute
Binary file size84 + 50n bytes, exactly
Number formatIEEE 754 single precision, little endian
ASCII keywordssolid, facet normal, outer loop, vertex, endloop, endfacet, endsolid
UnitsNone. Coordinates are arbitrary
ColorNot in the specification. Two incompatible extensions
Media typemodel/stl, registered with IANA March 2018, formerly application/sla
PRONOM, binaryfmt/865, STL (Standard Tessellation Language) Binary, type Model
Binary signatureNone recorded, and declared impossible
Binary record added21 January 2016, from the Canadian Centre for Architecture
PRONOM, textx-fmt/108, STL (Standard Tessellation Language) ASCII
Text signaturesolid, then facet normal, then outer loop, then vertex
Text signature added21 March 2012, from the Georgia Tech Research Institute
Library of Congressfdd000505 binary and fdd000506 ASCII, both updated 25 February 2025
Replacements3MF, ZIP and XML, published 2015, now ISO/IEC 25422:2025. AMF, from the 2009 STL 2.0 proposal

Why no tool can identify a binary STL file

PRONOM identifies formats by looking for fixed bytes at fixed places. A binary STL offers none. Its first 80 bytes are whatever the writing program felt like putting there, and everything after that is numbers. The registry says so in its own record, which is a rare thing for a format registry to admit.

"the structure of STL Binary, though well defined, makes it impossible to create an identification signature under the current PRONOM signature model"
The National Archives, PRONOM record fmt/865, STL (Standard Tessellation Language) Binary

So the binary record carries no byte signature at all. The text variant got one in March 2012, because solid followed by facet normal followed by outer loop followed by vertex is a pattern. The readable, rarely used encoding is identifiable. The compact, universal one is not.

The arithmetic from section 3 identifies a binary STL perfectly well. It is simply not the kind of rule a signature registry can express, because it is a sum rather than a string.

The other formats that claim the STL extension

Other file types using .stl, as FileInfo records them.
File typeCategoryNote
Stereolithography fileCADWhat this page is about
SuperTux level fileGamePlain text, from the open source game
Certificate trust listWebA Windows security file, not a model
Fireworks style libraryDataFrom Adobe Fireworks, discontinued in 2013
EBU subtitles fileVideoBroadcast subtitle timing

Five file types under one extension, and none of the four others opens in a slicer. One text-editor look separates them in seconds.

What people get wrong about STL files

“download a STL viewer tool that open a IGS file” From the page this one replaces. An IGS file is a CAD surface file from a different family, and no STL viewer opens one. The two formats answer different questions, which is why they have separate pages here.
“STL is an ASCII STL format as well as a binary STL format” Also the old page. Any given STL file is one or the other and never both. The two cannot be mixed inside one file.
“inability to detect or fix errors in the surface mesh” Backwards. Mesh errors in STL files are easy to detect and usually easy to fix for free, and section 8 does exactly that. What an STL cannot do is prevent them.
“a complete listing of the X,Y and Z coordinates of these corners & perpendiculars” The corners are always there. The perpendiculars often are not, because many programs write 0 0 0 there and expect whatever opens the file to derive the direction instead.
“C++ standard template library” listed as a file type The old page listed the C++ Standard Template Library among file types using this extension. The STL in C++ is a library of code rather than a file format, and the collision is in the initials alone.

Where these STL file facts come from

The byte layout, the facet normal rules, the closure rule and both color extensions come from the Wikipedia article on the STL format. The same material appears in the Library of Congress records fdd000505 and fdd000506, which cite the 1989 StereoLithography Interface Specification.

The registry identifiers, the missing binary signature and the two submission dates come from PRONOM at The National Archives. The media type and its March 2018 registration come from IANA by way of the Library of Congress.

The export tolerance figures are Stratasys's published per-program settings. The 25.4 factor and the unit wording come from MeshCAM's documentation and a SketchUp forum answer from January 2019. The binary header beginning solid comes from a meshio bug report against SolidWorks exports.

The 3D Viewer and Paint 3D dates are Microsoft's own, taken from its deprecated-features page. The Meshmixer wording is Autodesk's. The 3D Builder date comes from reporting rather than from Microsoft, which does not list that app. The list of other .stl claimants comes from FileInfo.

Frequently asked questions about STL files

What is an STL file?
An STL file records the outside of a 3D object as triangles. Every triangle carries three corner points and a direction, and enough of them laid edge to edge wrap the object completely. An STL holds no units, no color, no materials and no design history, which is why almost every 3D printer accepts one.
How do I open an STL file?
Any slicer opens an STL: UltiMaker Cura, PrusaSlicer, Bambu Studio and OrcaSlicer are all free. For editing, Blender, MeshLab and FreeCAD are free on Windows, macOS and Linux. On a Mac, Preview opens an STL with nothing installed. Windows no longer ships anything that opens one.
What does STL stand for?
Stereolithography, the 3D printing process the format was built for in 1987. Chuck Hull, who invented both, called it an abbreviation for stereolithography. Standard Triangle Language and Standard Tessellation Language are later readings that no specification ever carried.
What is the difference between an ASCII and a binary STL?
Both hold identical triangles. An ASCII STL writes them as readable text with one line per corner, and it runs four to five times larger. A binary STL writes fixed 50-byte records and is what nearly every program exports. Choose binary unless a tool specifically wants text.
Why did my STL file print at the wrong size?
Because an STL records bare numbers and no unit. Your slicer assumed millimeters. If the part is 25.4 times too small, the file was drawn in inches. If it is 1000 times too small, the file came from a scene measured in meters. Scale it in the slicer, or set the export units and write the STL again.
Can an STL file be edited?
The mesh can be edited, the design cannot. Blender, MeshLab and FreeCAD will move corner points, cut the mesh and merge pieces. What an STL does not hold is how the shape was built, so a real dimension change means reopening the CAD file it came from.
Why is my STL file so large?
Triangle count, and nothing else. A binary STL costs exactly 50 bytes per triangle, so a million triangles is a 50 MB file whatever the shape. Curves are what spend triangles. Loosen the export tolerance, or reduce the mesh in MeshLab or Blender.
What does it mean when a slicer says my STL is not watertight?
It means the triangles do not seal a volume. A sound STL has every edge shared by exactly two triangles, with nothing missing, nothing inside out and nothing overlapping. A hole leaves the slicer unable to tell inside from outside. Most repair tools fix this in one click.
Can an STL file store color?
Not in the format as documented. Two makers added color to the spare two bytes on every triangle, and they chose opposite bit orders. A Materialise file read as a VisCAM one therefore comes out with red and blue swapped. Nothing in an STL says which scheme is in use. Use 3MF for color.
Should I use STL or 3MF?
Send 3MF where the receiving end accepts it, because it carries units, color, multiple parts and print settings in one package. Send an STL where you need something that opens anywhere, which is still almost everywhere. Keep the CAD file whichever one you send.
How do I convert an STL file to STEP?
Not cleanly. Going from CAD to an STL throws the exact surfaces away and leaves triangles, and no tool reliably puts them back. FreeCAD and Fusion will rebuild a solid from a simple mesh, and the result needs checking by hand. If the original CAD file exists, ask for that instead.
How can I tell whether an STL file is binary or text?
Do the arithmetic rather than reading the first word. Read the 4-byte count at offset 80, then check whether the file size equals 84 plus 50 times that count. If it does, the STL is binary. SolidWorks writes binary STL files beginning with the word solid, so the first word proves nothing.

Still stuck with an STL file? Five places worth trying next

Nothing opens it?

Install any free slicer. Section 4 lists nine that cost nothing.

Wrong size?

Measure the ratio. Section 7 names the unit from the factor.

Was the STL file meant to be an editable model? IGS surface files carry CAD geometry between programs rather than triangles, and that page covers what survives the trip and what does not.

Working on the textures rather than the shape? DDS texture files hold the compressed images that get wrapped around a 3D model, and they have their own set of traps.

Came from a drawing instead of a model? PLT files and HPGL plotter files cover the 2D side of the same workshop, and EPS files cover vector artwork.

Is the fault in the machine instead? Our Windows error guides start from the message on screen, and our macOS fixes do the same job on a Mac.

New to 3D file formats altogether? What a file format is covers the ideas underneath all of this, and our file format guides index every extension we have written up.

Got an STL that none of this explains? Send us its size in bytes and the first line and we will tell you what you are holding.

Was this page helpful? Thanks for your feedback!