Browser-local converter
DXF to GLB converter
Turn a flat CAD drawing into a GLB you can drop into a web viewer or an AR scene. You supply the thickness; the unit comes from the drawing itself, so the conversion into the metres glTF requires is known rather than guessed.
Drop your DXF files here
STL, OBJ, PLY, GLB, glTF, 3MF, SVG and DXF. Nothing is uploaded: files are read and converted inside this tab. Checking what this device can handle...
Queue
No files yet. Drop models above, or use the file picker.
Output
Units
Size and placement
Repair and cleanup
These can change the shape, so they need a before-and-after review before export.
Inspection
Add a model to see its dimensions, mesh health and estimated volume.
What this DXF to GLB conversion does and does not do
- An extrusion depth in millimetres is required, because a DXF describes outlines on a plane and nothing more.
- glTF is defined in metres. The unit declared in $INSUNITS is used to scale the geometry, so a drawing in millimetres is divided by 1000 on the way out. When the DXF declares no unit, millimetres are assumed and you are told.
- A DXF has no colour, materials or texture coordinates, so the GLB is written with geometry only and will render untextured grey until you assign a material downstream.
- Only closed outlines become solid. Open chains are reported and left out rather than force-closed.
- The GLB is written uncompressed: Draco and meshopt need an encoder this site does not ship.
- SPLINE, TEXT, DIMENSION and HATCH cannot be extruded and are listed as skipped.
Troubleshooting
The model is a thousand times too large
The unit was not what the file declared, or none was declared and millimetres were assumed. The workspace shows the unit it read and its source; correct it and export again.
It renders flat grey
Expected: a DXF has no material data at all. Assign a material in the workspace, or set one in the tool you import into.
The edges look faceted in the viewer
Lower the curve tolerance so arcs flatten into more segments, and recalculate normals with smoothing if you want the side walls shaded smoothly.
Nothing converted
No outline closed. Join the profile into a closed polyline in your CAD tool; construction geometry and unjoined boundaries are the usual cause.
Questions
Is the GLB standards-compliant?
Yes. Positions carry the specification-required accessor minimum and maximum, buffer views are 4-byte aligned and chunks are padded exactly as the container demands, so it passes strict validators.
Why is the unit handling better here than from an STL?
Because a DXF can state its unit and an STL cannot. When $INSUNITS is present the scale into metres is exact rather than a convention you have to supply.
Can I get a glTF and .bin instead?
No. GLB is written because a single self-contained file has no way to lose its buffer, whereas a .gltf and its sidecar can be separated and then neither half works.
More tools
- DXF to STLA DXF is flat and an STL is a solid, so this conversion has to add the one thing the drawing does not contain: thickness.
- DXF to OBJTurn a flat DXF drawing into a Wavefront OBJ solid on your own machine.
- STL to GLBTurn an STL into a GLB you can drop into a web viewer, a game engine or an AR scene.
- DXF to 3MFConvert a flat DXF into a 3MF solid locally.