Free STL test files and sample generator
The standard 3D-printing mesh format (ASCII). Create valid .stl sample files to test slicers, 3D viewers and CAD tools.
What is a .stl file?
STL: Stereolithography 3D Model. STL is the 3D-printing standard: a bare list of triangles with no color, texture or units. Its simplicity is why every slicer reads it and why it carries so little information.
Why generate a test STL file?
- Test a slicer or 3D-print service intake.
- Verify triangle parsing and mesh validation.
- Check file-size limits on model uploads.
How a .stl file is identified
A .stl file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How the size lands on the exact byte
The format allows comments, so the padding is comment lines, legal, inert, and visible if you open the file.
Negative testing with broken STL files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed. Same length as the valid file.
- Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation, and for this format's encodings, UTF-16 and BOM test files.
Sample STL content
solid test
facet normal 0 0 0
outer loop
vertex 0 0 0
vertex 1 0 0
vertex 0 1 0
endloop
endfacet
endsolid testThis shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open in a slicer (Cura, PrusaSlicer), Windows 3D Viewer, or MeshLab.
Media type model/stl · extension .stl · category 3D
Generate a .stl file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about STL files
What identifies a .stl file?
Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How can a .stl file be an exact number of bytes?
The format allows comments, so the padding is comment lines, legal, inert, and visible if you open the file.
Can I download several broken STL files at once?
Yes, select more than one File Condition and you get one ZIP containing a .stl per condition, each named after its condition.
Can the STL file use UTF-16 or a byte-order mark?
Yes. .stl is a text format, so it can be generated as UTF-8, UTF-8 with a byte-order mark, UTF-16 LE or UTF-16 BE. The body is shortened before re-encoding so the finished file still lands on the exact size you asked for. Note that a UTF-16 file always has an even byte count.
How do I open or verify the STL file?
Open in a slicer (Cura, PrusaSlicer), Windows 3D Viewer, or MeshLab.