Binary STL cube (12 triangles)
A unit cube as a binary STL file: an 80-byte header, a triangle count and 12 triangles of 50 bytes each, 684 bytes in all.
Download
sample-cube-binary.stl
684 B684 bytes
Download STL sampleDirect download. No sign-up and no waiting.
- Type
- model/stl
- SHA-256
1ec708939d3a75ab6784be36886851509d001871aa9801ced9941c5b5dcfb3ea- Direct URL
https://www.sampletestfiles.com/downloads/samples/sample-cube-binary.stl
Why test with this file
The smallest useful solid for testing a binary STL reader. Its volume, surface area and bounding box are known exactly, so the numbers your software reports can be checked by hand.
| Triangles | 12 |
|---|---|
| Encoding | Binary STL (little-endian) |
| Shape | Cube with edges of 1 unit, from (0, 0, 0) to (1, 1, 1) |
| Volume | 1 cubic unit |
| Surface area | 6 square units |
| Watertight | Yes, with outward-facing normals |
| Attribute bytes | Zero |
What to check
After your application has processed sample-cube-binary.stl, confirm that:
- The reader takes the file as binary. Its header does not begin with the word "solid", which is how readers tell the two encodings apart.
- The mesh has 12 triangles and, once duplicate corners are merged, 8 vertices.
- The computed volume is 1 and the bounding box runs from 0 to 1 on every axis.
First bytes of the file
The first 64 bytes of sample-cube-binary.stl as a hex dump: offset, bytes, then the same bytes as text.
00000000 42 69 6e 61 72 79 20 53 54 4c 20 73 61 6d 70 6c |Binary STL sampl|
00000010 65 3a 20 61 20 75 6e 69 74 20 63 75 62 65 20 6f |e: a unit cube o|
00000020 66 20 31 32 20 74 72 69 61 6e 67 6c 65 73 2e 20 |f 12 triangles. |
00000030 53 61 6d 70 6c 65 54 65 73 74 46 69 6c 65 73 20 |SampleTestFiles |Preview
This STL file is binary, so there is no text to show. Download it and open it in an application that reads STL.
Technical details
| File name | sample-cube-binary.stl |
|---|---|
| Format | STL (STL 3D model (stereolithography)) |
| Extension | .stl |
| MIME type | model/stl |
| Size | 684 bytes (684 B) |
| Kind | Binary |
| SHA-256 | 1ec708939d3a75ab6784be36886851509d001871aa9801ced9941c5b5dcfb3ea |
| Created | 2026-10-10 |
| Validation | Exact size, signature bytes and structure checked when the file was generated |
| Preview | Not available for this file; details only |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | 3D Models |
Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-cube-binary.stl 'https://www.sampletestfiles.com/downloads/samples/sample-cube-binary.stl'
sha256sum sample-cube-binary.stl # Linux
shasum -a 256 sample-cube-binary.stl # macOSOn Windows, run Get-FileHash sample-cube-binary.stl -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
About STL
The standard file for 3D printing: a bare list of triangles, as text or as binary.
Where it fits
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- File upload testing
Test an upload form or endpoint with files of every size and type it should accept, and several it should refuse.