How to convert 3MF to GLB
- Unpack the OPC archiveThe 3MF is opened as a ZIP; [Content_Types].xml and _rels/.rels are read to locate 3D/3dmodel.model, and deflated entries are inflated by client-side JavaScript.
- Read the model documentThe XML is scanned for the declared unit, every <object> mesh, <build> items, nested <components> matrices and the material groups each triangle references.
- Build the scene graphEach build item becomes a node, its 4×3 column-major matrix becomes a glTF node matrix, and the mesh stays in local coordinates instead of being baked into world space.
- Map appearance to glTFBase materials become named materials with a baseColorFactor converted from sRGB to linear; colour groups become per-vertex COLOR_0; triangles are split by material index.
- Apply the export scale and write the GLBThe selected factor is applied to the scene, then a JSON chunk and a BIN chunk are written with 32-bit float positions and the original index buffer.
What happens when 3MF is converted to GLB
One setting decides whether the result is usable. 3MF states its unit; glTF has no unit field at all and the specification reads linear values as metres. The exporter drops the label and copies the numbers, so a millimetre model arrives a thousand times too large unless you choose the mm → m scale. Everything else on this page is secondary to that.
Triangles and topology are copied, not rebuilt
The loader turns each 3MF <mesh> into an indexed BufferGeometry, and the glTF exporter writes those positions and indices straight out. A 12-triangle cube stays 12 triangles; a 24-triangle two-part file stays 24. There is no retessellation, no welding and no decimation at this stage, so a model that arrives with cracks or flipped windings keeps them. The one structural change is that adding vertex colours forces the geometry to be split per corner, because glTF attributes must be per-vertex while 3MF colours are per-corner and per-face.
The unit label is dropped and the numbers are untouched
3MF allows millimetre, micron, centimetre, inch, foot and metre, and the loader reads that attribute. It never applies it. A 20 mm cube exports with a bounding box of 0 to 20; the same cube declared in microns, with coordinates 1000× larger, exports at 0 to 20000. glTF 2.0 says linear distances are metres and provides no field to argue, so the number is the only signal left. Open the file in Blender, three.js or a web viewer and a millimetre part measures 20 m until you scale it.
Base materials keep their names and colours
A <basematerials> group maps one material per base, each keeping its 3MF name and display colour. Tested with a red and a blue base, the GLB came out with two materials named red and blue and baseColorFactors of 1,0,0 and 0,0,1. Names survive because the loader assigns them to the three.js material and the exporter writes material.name. Colours are converted from sRGB to linear, so a 0xCC grey is stored as 0.6038 and renders correctly in a spec-compliant viewer.
Colour groups become COLOR_0 vertex colours
A <colorgroup> with per-triangle indices has no direct material equivalent, so the loader bakes the colours into a vertex colour attribute. The exporter writes that as COLOR_0 alongside POSITION, and the material itself stays white with no baseColorFactor. That is the correct glTF encoding for per-corner colour and it means a multi-coloured 3MF keeps its colour pattern without needing one material per triangle. It also means the colours travel in the binary buffer rather than in the material list, so a tool that only reads materials will show the part as white.
Placement stays editable as node matrices
This is the clearest gain over STL. A build item with a translation of 40 units becomes a glTF node carrying that translation matrix, while both meshes keep local bounds of 0 to 20. The offset is therefore a live transform you can edit, animate or instance in Blender or three.js, not a number that has been multiplied into every vertex. Nested <component> references become parent-child node chains, so a repeated component can remain a shared mesh referenced from several nodes rather than being duplicated.
Part names come through as node names
An <object name="Body"> reaches the GLB as a node called Body, and the same for Cap in the paired test. That makes a multi-part print assembly navigable in an outliner instead of appearing as anonymous meshes. The duplication is worth knowing about: the name is applied both to the mesh node and to its parent group node, so a two-part file shows four named nodes. Build-item names are not read, and a file whose objects have no name attribute produces unnamed nodes.
No normals exist in either file
3MF core meshes have no normal element; shading is meant to be derived from winding. The exported primitives therefore contain POSITION only, plus COLOR_0 when colours are present, and no NORMAL accessor is written. A glTF viewer is expected to compute flat facet normals in that case, which looks correct on machined parts and blocky on organic ones. Any smooth shading set up in the original CAD tool is not recoverable, because it was never stored in the 3MF to begin with.
Surface finish is a fixed default, not authored PBR
The loader produces Phong materials, which have no metallic or roughness channel, so the exporter emits metallicFactor 0.5 and roughnessFactor 0.5 for every material. That is a neutral midpoint rather than a measured value: a 3MF that looked like brushed aluminium and one that looked like matte PLA both arrive with the same finish. Treat the GLB as a geometry and colour deliverable, then set roughness and metalness in the receiving tool if the look matters. The exporter logs a warning about the material type when it does this.
3MF vs GLB
| 3MF source | GLB output | |
|---|---|---|
| Container | OPC ZIP with XML parts | Binary glTF: JSON chunk plus BIN chunk |
| Unit | Declared: mm, micron, inch and others | No field; metres by specification |
| Geometry | Shared <vertices> plus indexed <triangles> | POSITION accessor with indices, plus COLOR_0 when coloured |
| Placement | Build item and component 4×3 matrices | Node matrices, still editable |
| Parts | Separate <object> elements with names | Separate nodes, names preserved |
| Colour | Colour groups, base materials, per-face indices | Vertex colours and/or baseColorFactor |
| Finish | Display colour only, no PBR channels | metallicFactor 0.5, roughnessFactor 0.5 |
| Normals | Not stored | Not stored; viewer derives flat normals |
| Print data | Optional production, slice and beam extensions | Not read; no equivalent |
| Compression | Deflated ZIP members | Optional Draco or meshopt, not applied here |
Supported formats
| Format | Read | Write | Notes |
|---|---|---|---|
| STEP (.step .stp) | Yes | – | ISO 10303 B-rep, AP203 / AP214 / AP242 |
| IGES (.iges .igs) | Yes | – | Entity-based surfaces, up to 5.3 |
| BREP (.brep) | Yes | – | OpenCascade native B-rep |
| STL (.stl) | Yes | Yes | Binary and ASCII triangles, no units |
| OBJ (.obj) | Yes | Yes | v / vn / f records; .mtl references ignored |
| PLY (.ply) | Yes | Yes | Binary position and normal arrays |
| GLB / glTF (.glb .gltf) | Yes | Yes | glTF 2.0, binary or JSON with data URI |
| 3MF (.3mf) | Yes | Yes | OPC/ZIP package, declares millimetres |
| FBX (.fbx) | Yes | – | Binary and ASCII, static mesh only |
| DAE (.dae) | Yes | Yes | Collada scene graph is flattened |
| 3DS (.3ds) | Yes | – | Legacy chunk-based 3D Studio format |
| AMF (.amf) | Yes | – | XML, ZIP-compressed packages supported |
| USDZ (.usdz) | Yes | Yes | ZIP containing a USD stage |
Known limitations and why a conversion can fail
The unit mismatch is yours to fix
Because glTF has no unit field, the converter cannot write the declaration even if it wanted to. It could silently multiply millimetre sources by 0.001, but that would be wrong for a consumer that expects millimetres, and it would make a micron source look millimetre-scaled when it is not. The export scale is exposed as a choice instead of a guess. If you forget it, the symptom is unmistakable: the model loads, looks correct, and is exactly a thousand times too large or too small against a reference object.
Print and slice data are not read
The 3MF production extension carries slice stacks, build plate placement, support and layer information; beam lattices, composited materials and triangle sets sit outside the core mesh too. None of it is parsed, because glTF has no vocabulary for manufacturing intent. A file that opens in a slicer with a prepared plate therefore arrives as bare geometry on the origin. This is a format boundary rather than a bug, and no target format except 3MF itself would preserve it.
No normals means flat shading
Without a NORMAL accessor, every consumer picks its own fallback. Most compute per-face normals from winding, which is faithful to the source but gives a faceted look on curved surfaces. Some compute smoothed normals instead, which can hide tessellation but also blur hard edges that should stay sharp. If the shading matters, compute normals after import with an angle threshold rather than expecting the converter to invent a smoothing group the 3MF never declared.
Textures and composite groups are outside the tested path
This page's tests cover core geometry, base materials and colour groups. Texture2d groups that reference image parts inside the package, composite materials that blend several bases, and multi-property groups are a different code path, and their behaviour depends on the image parts being present and readable. Until a file of that kind is verified here, treat textured 3MF as unsupported and check the result before shipping it. Geometry and solid colours are the reliable subset.
Big packages cost memory twice
The whole ZIP is inflated in the tab before parsing, then the geometry is duplicated once more for the export buffer, so peak memory is roughly the inflated XML plus the GLB. In the 3MF to STL test on this machine a 7.4 MB package holding 385,467 triangles needed about 3.4 s just to inflate and parse. A GLB is far smaller than the equivalent STL because it indexes shared vertices, but the peak during conversion is still driven by the source package. Very large assemblies are better handled offline.
Measured on this machine, December 2026
Five fixtures were built for this page and run through the same 3MF loader and glTF exporter the site ships, under Node 22 with a DOM shim. Each file was converted three times and the GLB parsed back; counts and bounding boxes were identical across runs. The verification method is documented on the methodology page.
| 3MF fixture | Declared unit | Triangles | GLB bounds | Primitive attributes | GLB size |
|---|---|---|---|---|---|
| Single 20 mm cube | millimetre | 12 | 0 → 20 | POSITION | 1,008 B |
| Two cubes, second at x=40 | millimetre | 24 | 0 → 60 | POSITION, COLOR_0 | 3,068 B |
| Two cubes, red and blue bases | millimetre | 24 | 0 → 60 | POSITION, 2 materials | 1,924 B |
| Two named parts, Body and Cap | millimetre | 24 | 0 → 60 | POSITION, named nodes | 2,048 B |
| 20 mm cube written 1000× larger | micron | 12 | 0 → 20,000 | POSITION | 1,016 B |
Three results are worth reading off the table. Triangle counts are conserved exactly. The micron file keeps its 20,000-unit coordinates with no hint of the unit in the GLB, which is the failure mode described above. And part placement survives as a node transform rather than baked vertices, verified by the two-cube rows: the world bounds reach 60 while each mesh still spans 0 to 20. Sizes at kilobyte scale are dominated by container overhead, so no compression ratio is claimed from them.
Frequently asked questions
Can I convert on this page itself?
No. This page documents the 3MF to GLB path, and the conversion runs in the workspace the button above opens, with both formats preselected. The file is read in that browser tab and the download is written locally, so no upload happens in either place. Keeping documentation and engine on separate addresses lets format support change behind one workspace without breaking this page.
Why is my model a thousand times too large in Blender or three.js?
Because the unit label was dropped and the numbers were not rescaled. A 20 mm cube is written as 20 units, and glTF 2.0 defines its linear unit as the metre, so a viewer that follows the spec puts that cube at 20 m across. A 3MF declared in microns is worse: its coordinates are already a thousand times larger and they also pass through untouched. Pick the mm to m export scale in the workspace before downloading.
Which export scale should I choose for GLB?
mm to m, a factor of 0.001, for anything authored in millimetres, which is the 3MF default and what every slicer writes. Choose 1:1 only when the consumer treats one unit as one millimetre, such as an import preset that overrides the glTF convention. The m to mm and in to mm options exist for the reverse cases.
Do colours and materials survive?
Base materials do: each becomes a glTF material carrying its 3MF name and a baseColorFactor, tested with red and blue as well as body and cap pairs. Colour groups become per-vertex COLOR_0 attributes while the material base colour stays white, which is how glTF expresses per-corner colour. Authored PBR does not survive, because a 3MF material has no metal or roughness channel and the exporter writes 0.5 for both.
Do separate parts stay separate?
Yes, and better than in STL. Each build item becomes a node, and its 4×3 matrix becomes a glTF node matrix, so a second part offset by 40 units keeps that offset as an editable transform instead of baked coordinates. Object names come through as node names. The meshes stay separate rather than being merged into one triangle set.
Are normals preserved?
Neither format stores them on this path. 3MF core meshes carry no normal element, and the exported primitives contain POSITION only, plus COLOR_0 when colours exist, with no NORMAL accessor. Viewers therefore derive flat facet normals, so a smooth-shaded 3MF looks faceted after conversion regardless of the target format.
Are print settings kept?
No. Supports, layer height, build plate placement, slicer profiles, the production extension, slice stacks and beam lattices are not read; only the core mesh and its materials are. A 3MF is a print package, while a GLB is a scene asset, so the manufacturing intent is gone by design rather than by accident.
Can it read zipped or compressed 3MF files?
Yes. The package is opened as a ZIP and deflated members are inflated in JavaScript before the XML is parsed, so both compressed and stored 3MF files open. Content types and package relationships are followed to find the model part, which means extra thumbnails, metadata or texture parts do not confuse the reader.
References
- 3MF Consortium specification
- glTF 2.0 specification
- three.js documentation — loaders and exporters
- How this site is built and tested
Related converters
All converters
Last updated: