STL guide

STL File Format: ASCII vs Binary, Units, and Solid Meshes

Choose binary STL for compact routine exchange and ASCII when readable text helps inspection. In either form, confirm the scale and validate the solid mesh before slicing.

Core dataTriangle facets with a normal and three vertices
Encoding choiceBinary for compact exchange; ASCII for readable inspection
Scale ruleAgree on the unit because STL coordinates do not declare one
AI-generated editorial portrait representing Maya Chen, imgrove image workflow editor

About Maya Chen

Image Workflow Editor

Maya is the editorial pen name used by the imgrove team. Her portrait is AI-generated. The team publishes tested, source-based guides to image formats and browser workflows.

Choose binary for delivery and ASCII for inspection

ASCII and binary STL carry the same basic object: a surface made from triangular facets. Each facet records a normal and three vertex coordinates. ASCII spells those values out in text between solid and endsolid markers, which makes a small file easy to open and inspect. [1] Binary stores fixed-size numeric records, so it is the practical default for routine downloads and dense meshes. [2]

Choose binary when file size and transfer speed matter. Choose ASCII when a person needs to read a tiny fixture, compare generated text, or debug an exporter. Converting between the two does not add texture, color, materials, curves, or CAD features. Both forms reduce the surface to triangles.

Binary size follows the triangle count

A common binary STL layout starts with an 80-byte header and a 4-byte unsigned triangle count. Every triangle then uses 50 bytes: 12 bytes for its normal, 36 bytes for three vertices, and a 2-byte attribute field. [2] That gives a useful exact check: binary bytes = 84 + 50 × triangles.

For example, a closed 32 by 24-cell heightmap has 3,072 top and bottom triangles plus 224 wall triangles, or 3,296 in total. Its binary STL should contain 164,884 bytes. This calculation can catch a truncated export before another app tries to render it. ASCII size varies because digit counts, precision, signs, spaces, and line endings vary.

STL coordinates need an agreed unit

STL stores coordinate numbers but does not declare whether they mean millimetres, inches, metres, or another unit. The same width value of 80 can therefore arrive as 80 mm in one workflow and 80 inches in another. Record the intended unit beside the file and confirm the imported dimensions before slicing.

Blender exposes scale and scene-unit controls on STL import and export, which shows where the handoff decision belongs. Its exporter also offers ASCII output, while the default workflow supports binary STL. [3] Set the model width in the exporter, import it with the intended unit convention, then compare the measured width, depth, and height with the job specification.

A printable relief needs more than a top surface

An image heightmap turns luminance into elevation, but a raised top grid alone is an open sheet. A solid relief also needs a bottom and four connected walls. Give the base a positive thickness so black or transparent pixels still sit above the bottom plane. Preserve the source aspect ratio so a wide logo does not become a square model.

Before slicing, check that every coordinate is finite, every triangle has non-zero area, and every undirected mesh edge belongs to exactly two triangles. Check facet orientation, model dimensions, and base thickness too. Prusa notes that corrupt models are common and that slicers can repair some, but not all, problems automatically. [4] Blender's Validate Mesh option also checks imported data for corruption. [3]

Build the mesh, then verify the handoff

Use the imgrove Image to STL tool with one PNG, JPEG, or WebP image. Choose the long-side grid, model width, relief height, base thickness, and binary or ASCII output. The browser preserves the source aspect ratio, computes facet normals, closes the bottom and walls, and reports model dimensions, triangle count, and file size.

Treat the generated coordinates as your chosen unit, then open the downloaded file in the 3D Model Viewer or a slicer. Confirm the shape and scale before manufacturing. The tool creates a luminance relief; it does not reconstruct hidden sides, repair every source design, or replace a printability review.

ASCII vs binary STL at a glance

DecisionASCII STLBinary STL
GeometryTriangle normals and vertices written as textThe same normal and vertex values in fixed-size records
Best useSmall fixtures, teaching, text inspection, and exporter debuggingRoutine downloads, handoffs, and meshes with many triangles
File sizeVaries with numeric text and whitespaceExactly 84 + 50 × triangle count bytes in the common layout
Human readabilityReadable in a text editorNeeds an STL-aware parser or viewer
UnitsNot declared by the formatNot declared by the format
What to verifyScale, finite facets, closure, orientation, and base thicknessByte count, scale, finite facets, closure, orientation, and base thickness

Use STL when

  • Surface shape is the main information passed to a slicer or viewer
  • A simple closed relief or manufacturing mesh is enough
  • The sender and receiver can agree on scale outside the file

Choose another format when

  • The asset needs textures, materials, animation, or scene hierarchy
  • The workflow needs exact CAD solids, curves, constraints, or tolerances
  • The recipient cannot confirm the intended coordinate unit
GLB vs glTF: Which 3D Format Should You Use? PNG: lossless pixels, transparency, and dependable screenshots
Image to STL 3D Model Viewer GLB vs glTF Guide

Create a closed STL relief in your browser

Choose one image, preserve its aspect ratio, set the model width and positive base, then export compact binary STL or readable ASCII STL. Your image stays in this browser tab.

Try Image to STL

Technical references