OBJ · STL · PLY · OFF · glTF/GLB

3D Model Format Converter

Convert between common 3D formats, rescale units, merge or split meshes, recompute normals, and check every output by reading it back.

Model

OBJ + MTL, STL, PLY, OFF, glTF, GLB

Drop a model here or click to choose

Select an OBJ together with its MTL, or a .gltf with its .bin. Up to 80 MB.

Output

Applied after the unit change. STL and OBJ carry no unit, so the numbers are the unit.

Flat normals give every triangle its own three vertices.

Preview

Open a model to see it here.

3D Model Format Converter

Operator: Abdulla Al Fahad. How tools are built and checked

A 3D file that opens fine in one program arrives as a pile of triangles with the wrong size, the wrong way up, or no colour in the next. The cause is almost never the geometry. STL has no units and no shared vertices, glTF is in metres with Y pointing up, OBJ keeps colour in a separate MTL file, and PLY keeps it on each vertex.

Key features

  • Reads OBJ (with its MTL diffuse colours or v x y z r g b vertex colours), STL ASCII and binary, PLY ASCII and both binary byte orders, OFF, COFF, NOFF and CNOFF, and glTF or GLB with node transforms applied
  • Writes STL (binary or ASCII), OBJ, PLY (binary) and GLB from a glTF 2.0 writer of our own
  • Unit change between millimetres, centimetres, metres, inches and feet, an extra scale in percent, and a Y-up to Z-up or Z-up to Y-up rotation
  • Merge duplicate vertices, drop zero-area triangles, merge all meshes into one or write one file per mesh in a ZIP
  • Smooth (area-weighted) or flat normals for OBJ, PLY and GLB, and a 3D preview of the model as it will be written

What each format keeps and drops

STL stores each triangle with three private vertices and one normal, so a cube of 12 triangles is 36 vertices. Merge duplicate vertices compares positions exactly, bit for bit (and treats -0 as 0), and rebuilds an indexed mesh: the same cube becomes 8 vertices. Vertices that match in position but carry different colours stay separate, because merging them would lose a colour edge.

OBJ polygons with more than three corners are cut into a fan from the first corner. That is exact for convex faces and wrong for concave ones, which is a limit of the format conversion; the page does not check faces for concavity. Texture coordinates, textures and animation are not carried over to any output. glTF files are read from the scene's node tree with each node's matrix or translation, rotation and scale applied, and a mesh used by two nodes appears twice. A node with a negative scale (a mirrored part) would turn its faces inside out, so the page reverses the winding of those triangles to keep them facing outwards. OFF variants that add texture coordinates or extra dimensions to every vertex (STOFF, 4OFF, nOFF) are refused with a message, and a colour at the end of a face line is skipped.

The GLB writer places positions, optional normals, optional colours and indices in one binary chunk, each view aligned to four bytes. Vertex colours inside the page are sRGB, and glTF defines COLOR_0 as linear, so they are converted to linear light on the way out (sRGB 128 becomes 0.2159) and stored as four 16-bit normalised values per vertex, which keeps the dark end from banding; colours read from a glTF are converted back to sRGB. Indices are 16-bit when a mesh has 65,535 vertices or fewer, and 32-bit otherwise.

Safety limits apply while reading: 80 MB of input, 2 million triangles and 3 million vertices. Every index, accessor range, buffer length and glTF node depth is checked before use, Draco and meshopt compressed glTF are refused with a message, and a node tree that loops stops at 64 levels.

How it works

A worker reads the files into indexed meshes and sends back a summary and a preview. Press Convert and a second worker applies the units, rotation, merge and clean-up, writes the chosen format, then parses its own output with the same readers and compares the triangle count with what it wrote.

The preview draws at most about 800,000 triangles, keeping every nth one when the model is larger; the written file always contains all of them.

Cancel stops the worker immediately, and loading a new model while one is converting cancels the old job first.

Common use cases

  • A glTF model from a web viewer needs to be 3D printed. Choose STL, set the source unit to metres and the output unit to millimetres, and select Y-up to Z-up so the model stands on the printer bed instead of lying on its back.
  • A CAD export of a left-hand bracket was made by mirroring the right-hand one, so the glTF node has scale -1 on X. Converted to STL, the triangles are reversed so the normals point out of the metal, and the slicer does not flag an inverted part.
  • A scan exported as PLY with vertex colours is wanted in a web page. Convert it to GLB with Merge duplicate vertices on; the colours travel as COLOR_0 converted to linear light, as glTF defines it, and the preview shows them before you download.

How to use this tool

  1. Drop the model. For an OBJ add its .mtl in the same selection, and for a .gltf add its .bin.
  2. Pick the output format, then set the source and output units, extra scale and up axis if the receiving program expects something different.
  3. Choose normals and the clean-up switches, and merge or split meshes if the file has several.
  4. Press Convert, read the re-read check, then download the file or the ZIP.

Example

A 10 mm cube saved as binary STL, converted to inches

STL: 684 bytes, 12 triangles
Source unit millimetres, output unit inches, merge duplicate vertices on

Summary and the re-read check

36 vertices become 8; size 0.3937 × 0.3937 × 0.3937 in; surface area 0.93 in²
The GLB, OBJ and PLY written from it are each re-read with 12 triangles, and smooth normals add a normal for every one of the 8 vertices

Tips for best results

  • An STL from a CAD tool in inches can be confirmed by the size line: a part that reads 0.39 units across was probably drawn in inches, so set the source unit to inches before changing the output.
  • When a GLB opens a thousand times too big or small in another viewer, the unit pair is the usual cause. glTF assumes metres, so a model drawn in millimetres needs source millimetres and output metres, which divides every coordinate by 1,000.
  • Flat normals on a GLB triple its vertex count because every triangle gets its own three vertices. Use smooth normals unless the model must look faceted.

Edge cases to watch

A mesh with a hole stays a mesh with a hole. The page reports triangles, vertices, size and area, but it does not repair open edges.

OBJ materials other than a diffuse colour (textures, specular, transparency) are dropped, a face's colour from usemtl is copied to its three vertices, and glTF primitives that are points or lines are skipped, with a note saying so.

Common errors and how to fix them

"The header says … triangles but the file is … bytes"
The file is not a valid binary STL, or was cut off in transfer. Re-export it, or re-download the original.
"A face refers to vertex 7, but the file defines 4"
The OBJ lists a face before the vertices it uses, or an index is off by one. Faces may only point at vertices already defined above them.
"The glTF refers to the file …"
A .gltf keeps its geometry in a separate .bin. Select both files together so the page can match the name.

Best practices

  • Convert once from the original export instead of chaining formats; each hop through OBJ or STL drops colour or normals that the original had.

Which output format for which job

STL holds triangles and nothing else: no units, no colour, no shared vertices. It is what slicers and most print services expect. PLY is the compact choice for a scan with vertex colours, and its binary form stores each vertex as three floats and three bytes. OBJ is a readable text file that nearly every modelling tool opens, and it carries colour here as the widely read extension of three extra numbers after each vertex position.

GLB is a single binary file with geometry, normals, colour and a default material, in metres with Y up, which is what web viewers and augmented-reality previews load. The page reads OFF files too, but does not write them.

Frequently asked questions

Why does my STL have no colour after converting from GLB?

STL has no field for colour, so it is dropped on purpose. Choose PLY, OBJ or GLB if you need to keep vertex colours.

Why does a converted glTF look tiny or huge in my CAD or slicer program?

glTF stores metres and STL or OBJ store plain numbers that the receiving program reads as millimetres. Set the source unit to metres and the output unit to millimetres when going from glTF to STL, and the reverse for the other direction.

Why is an OFF file refused when its first line says STOFF or 4OFF?

Those variants add texture coordinates or extra coordinates to every vertex line, which changes how each line must be read. This page reads OFF, COFF (colour), NOFF (normals) and CNOFF, and says which header it refused instead of reading the extra numbers as geometry.