STL Binary vs ASCII: File Size, Layout and Which to Use
Add to Chrome
EnglishEN
Home › Guides › Binary vs ASCII

STL binary vs ASCII

STL binary vs ASCII is mostly a question of size: both hold the same triangles, but binary packs each one into 50 bytes while ASCII spells it out in seven lines of text. Binary suits printing; ASCII suits reading.

Drop STL, OBJ, 3MF, STEP or G-code here

or click to browse

Also GLB / glTF, PLY, IGES, OFF, 3DS, FBX, DAE, WRL, AMF · several files at once (OBJ + MTL, glTF + BIN)

🔒 Files are opened by your browser and never leave your device

Same triangles, two encodings

Either flavor stores a normal and three corner points for every facet. Neither stores units or color in the standard. The difference is the encoding: decimal text a human can read, or raw 32-bit floating-point numbers a program reads in one pass.

Slicers and mesh tools read both. Many exporters write binary by default because of size. A 250,000-facet model is about 12 MB as binary and roughly 70–75 MB as text. Binary also loads faster, since a reader can step through fixed 50-byte records instead of parsing words and digits.

Inside an ASCII STL

One facet of a cube, as an exporter writes it:

  1. solid cube
  2. facet normal 0 0 -1
  3. outer loop
  4. vertex 0 0 0
  5. vertex 20 20 0
  6. vertex 20 0 0
  7. endloop
  8. endfacet
  9. endsolid cube

Lines 2 to 8 repeat for every triangle. The example uses whole numbers, but many exporters print each value in scientific notation, such as -2.506665e-002, and indent the lines. Those digits and spaces are where the bulk comes from. The name after solid is optional.

Inside a binary STL

BytesContent
0–7980-byte header, any text; readers skip it
80–83triangle count, unsigned 32-bit integer
then 12 per facetnormal: three 32-bit floats
then 36 per facetthree vertices: nine 32-bit floats
then 2 per facetattribute field, left unused by the standard

All numbers are little-endian. A binary STL therefore always weighs 84 + 50 × N bytes, where N is the triangle count: our 9,024-triangle sphere is exactly 451,284 bytes. Readers use that formula to check a file is complete, and a download cut short by a dropped connection fails the test at once.

STL binary vs ASCII file size

We measured real files on 18.10.2026. A three.js test file exported by another program takes 80,861 bytes for 288 triangles, about 281 bytes per facet. Our own ASCII export of the test sphere takes about 302 bytes per facet. So a typical ASCII STL needs roughly 280–300 bytes per triangle, 5.6–6 times the 50 bytes of binary.

ModelTrianglesBinaryASCII
Cube12684 bytesabout 1.3 KB with whole numbers (108 bytes per facet)
Test sphere9,024451,284 bytes2,723,685 bytes, measured
Detailed print model250,000about 12 MBroughly 70–75 MB
Scan1,000,000about 48 MBroughly 280–300 MB

The cube row shows why the ratio is not fixed: with whole numbers a facet fits in 108 bytes, so the size depends on how many digits the exporter writes. ZIP compression narrows the gap because text repeats the same words, yet the unpacked file still has to be parsed. In our measurements 1M triangles as binary (48 MB) opened in about 5–12 s; the same mesh as 300 MB of text is a heavy load for a browser tab.

Precision and the header trap

Binary keeps about seven significant digits per coordinate. On a 200 mm part that means steps well under a micrometer, finer than any printer. ASCII can print more digits, but readers usually load them into the same 32-bit floats.

The 80-byte header may hold any text, including the word solid. A reader that only looks at the first five characters then treats a binary file as ASCII and fails. A sound reader checks whether the size equals 84 + 50 × N. The two attribute bytes per facet carry nothing in the standard, so do not expect color from them.

Which to pick, and how to switch

Text wins whenever a person or a simple script must see the numbers. Teachers use it to show what a mesh really is, developers write tiny ASCII test cases by hand, and ASCII files diff cleanly in version control. For anything you send to a printer, a print service or a customer, binary is the sensible default.

To change it, open the file, press Convert and choose STL binary or STL ASCII. Both directions were tested and re-opened with the same triangles, and the conversion runs in your tab without sending the mesh anywhere. The STL converter hub lists the other targets, and the STL format guide covers units and watertight meshes.

Questions and answers

Which is better for 3D printing, binary or ASCII?

Binary. The geometry is identical, the file is 5.6–6 times smaller than a typical ASCII export and it loads faster.

How can I tell if an STL is ASCII or binary?

Open it in a text editor. Readable lines with facet and vertex mean ASCII; scrambled characters mean binary. The Info panel shows the triangle count either way.

Does converting between them lose quality?

Going to binary keeps about seven significant digits, which is what most programs already used. Our round trip re-opened with the same triangles.

What is in the 80-byte header?

Anything the exporter likes, often the program name or the part name. Readers skip it, so by standard it carries no units or color.

Why is my ASCII STL so large?

Every coordinate is written out as text, roughly 280–300 bytes per triangle in the files we measured. Convert it to binary to cut that to 50.

How many bytes does one STL triangle take?

Exactly 50 in binary: 48 bytes of floats plus the 2-byte attribute field. In ASCII it depends on the digits, from 108 bytes with whole numbers to about 300 with long decimals.

Do slicers read both kinds?

Yes, both are part of the same format. Trouble comes only from broken files, such as a binary header that starts with solid.