A browser app that opens .meshy files and other 3D models, lets you inspect them, and exports them as GLB, glTF, OBJ, STL, PLY, USDZ or a painted 3MF for 3D printing.
Open the app → amal-david.github.io/meshy2glb
Conversion runs in your browser. Models are not uploaded anywhere, and there is no account, analytics or install step.
- Features
- Quick start
- Supported formats
- Usage
- Texture to paint (experimental)
- Chrome extension (optional)
- How
.meshydecoding works - Privacy
- Limitations
- Troubleshooting
- Development
- Project structure
- Documentation
- Credits
- License
- Open
.meshyfiles. Decrypts and decompresses Meshy's container into a standard GLB that Blender, Unity, Unreal and other glTF tools can read. - Open common 3D formats. GLB, glTF, OBJ, STL, PLY, DAE, 3MF and FBX, from files, a whole folder, or an HTTPS link.
- Inspect the model. Orbit camera, wireframe, auto-rotate, exposure and lighting sliders, background presets and animation-clip preview.
- Export. GLB, glTF, OBJ, STL, PLY and USDZ. The app shows what each format keeps and drops before you export.
- Texture to paint (experimental). Reduce a textured model to 2–16 colors and export a painted 3MF for PrusaSlicer 2, Bambu Studio or OrcaSlicer.
- Chrome extension (optional). Save the visible geometry from a Three.js viewer on a page you are allowed to export from.
- Open amal-david.github.io/meshy2glb.
- Drop a model onto the page, click Choose files, or paste a URL and click Open URL. To try the app without a file, click Try a textured sample.
- Inspect the model in the viewer.
- In Export, pick the content and format, then click Export.
To run it on your own machine instead, see Development.
| Format | Notes |
|---|---|
.meshy |
Meshy container, version 1. Converted to a standard GLB. |
| GLB | Original bytes are kept for GLB export when possible. |
| glTF | Select the .bin and texture files too, or use Choose folder. |
| OBJ | Select the .mtl and texture files too, or use Choose folder. |
| STL, PLY, DAE, 3MF, FBX | Loaded through the Three.js loaders. |
Files up to 256 MiB are accepted. The app opens one model at a time; it is not a batch converter.
| Format | What it keeps |
|---|---|
| GLB | Original bytes when available; otherwise regenerated scene data and animation clips. |
| glTF | Self-contained file with embedded resources and supported clips. |
| OBJ | Geometry and UVs. No .mtl, textures or animation. |
| STL | Geometry only. Binary STL, no units recorded. |
| PLY | Geometry, normals and vertex colors. No image textures. |
| USDZ | Static model for AR Quick Look. Rejects rigged, instanced, multi-material and vertex-colored meshes instead of exporting them incorrectly. |
| Painted 3MF | Only for a painted snapshot. Up to 16 filament regions. |
- Files. Drag files onto the page or click Choose files. For glTF and OBJ, include the companion
.bin,.mtland image files in the same selection. - Folders. Choose folder keeps relative paths, so textures referenced as
textures/wood.pngresolve. If two files in the folder share a name and the reference is ambiguous, the app reports an error rather than guessing. - URLs. Paste a direct HTTPS link to a model file, or a public Meshy model page (
https://www.meshy.ai/3d-models/...). The source server must allow cross-origin (CORS) requests from the browser. The app does not use a proxy and does not send cookies, so private, expired or login-protected links will not open; download those files and open them locally.
Another page can prefill the URL field by linking to https://amal-david.github.io/meshy2glb/#url=<encoded HTTPS URL>. Nothing is fetched until you click Open URL.
To find a model's URL on a web page, use the companion Asset Lens extension.
The Inspect panel controls the preview only: wireframe, auto-rotate, reset view, exposure, environment, direct and ambient light, and background (dark, light or black). None of these settings change what gets exported.
Pick what to export under Content, then a Format:
| Content | What you get |
|---|---|
| Original asset | The model as loaded. A .meshy file exports as its decompressed GLB. |
| Painted static snapshot | The limited-color result from Texture to paint, as a vertex-colored GLB or a painted 3MF. |
| Displayed geometry only (static) | The current pose baked into a static GLB, without textures, normals, rigs or animation. GLB only. |
This turns a textured model into a small set of flat color regions that a multi-material 3D printer can print.
- Load a textured model, or click Try a textured sample.
- In Texture to paint, set Colors (2–16), Detail (existing faces, or 64–512 px) and Edge-aware cleanup.
- Click Generate paint. Use View original to compare.
- Optionally click a swatch to change a color, then Apply edited palette.
- In Export, choose Painted static snapshot and Painted 3MF. Pick the Slicer encoding (PrusaSlicer 2, Bambu Studio or OrcaSlicer) and Millimeters per model unit.
- Open the 3MF in your slicer and assign filaments to each color.
The default scale is 1000 mm per unit because glTF uses meters. Change it if your model uses other units.
The result is a static, painted surface. It does not repair meshes, check printability, keep animation, or handle transparent textures. Details smaller than the chosen resolution may disappear. The color fitting uses Oklab, and cleanup keeps edges where the source texture has strong contrast; docs/ALGORITHM.md has the method, budgets and a benchmark against Texture2Paint.
The 3MF writer is reused from EllsworOpan's Texture2Paint under its MIT license.
The extension saves the geometry that a Three.js viewer is currently showing, for pages where you have permission to export the model.
npm ci
npm run build:extensionThen in Chrome:
- Open
chrome://extensionsand turn on Developer mode. - Click Load unpacked and select the
dist-extensionfolder. - On the model's page, click the extension icon, then Scan this tab.
- Select the meshes you want and save the GLB.
- Open that GLB in meshy2glb to convert it to another format.
The extension asks only for activeTab and scripting, and runs on a page only after you click Scan this tab. It saves geometry only: no materials, textures, rigs or animation, and up to 250,000 triangles. It cannot capture closed or non-Three.js renderers, and it may not work on Meshy's own viewer. See docs/INTEGRATIONS.md for details and for exposing a scene from your own app.
A .meshy file is a GLB wrapped in a thin encryption layer:
Offset Contents
0..7 magic "MESHY.AI"
8..9 version (uint16 LE, 1)
10..21 12-byte AES nonce
22..31 reserved
32..8223 AES-256-CTR ciphertext (always 8192 bytes)
8224..8239 16-byte AES-GCM tag (skipped)
8240..EOF plaintext: textures and meshopt-compressed streams
- Decrypt the first 8 KB with AES-256-CTR using WebCrypto (
src/decrypt.js). - Decompress every
EXT_meshopt_compressionbuffer view with meshoptimizer's decoder (src/decompress.js). - Validate the result as a standard GLB (
src/glb.js), then load it into the viewer.
The decoder was written from reverse engineering; it does not ship Meshy's WASM. NOTES.md records how the format was worked out, including the dead ends. Meshy can change the format at any time, which would break this decoder.
- Model files are processed in the browser and never uploaded.
- Open URL sends requests with cookies and referrer turned off. It contacts the host in the URL, any host that host redirects to, and the host serving the model's companion files. For a Meshy page it first asks Meshy's public task endpoint for the model, then downloads the model from the host that endpoint returns, which can be a different server such as a CDN.
- The page loads Three.js
0.169.0from a CDN, so the first visit needs a network connection. - No analytics or session recording.
Only convert or export models you own or have permission to use.
- Draco- and KTX2-compressed glTF files are not decoded.
- Only
.meshyversion 1 is supported. - OBJ export does not include an
.mtlfile or textures. - Custom glTF extensions may be lost when a GLB is regenerated rather than passed through.
- The Meshy URL resolver uses an undocumented public endpoint and can stop working without notice.
| Problem | Fix |
|---|---|
| A URL fails to open | The host probably blocks cross-origin requests, or the link is private or expired. Download the file and open it locally. |
| A glTF or OBJ loads without textures | Select the .bin, .mtl and image files together with the model, or use Choose folder. |
| "Unsupported .meshy version" | The file uses a newer container than this decoder knows. Please open an issue. |
| Nothing works when running locally | WebCrypto needs a secure origin. Serve over http://localhost (as ./start.sh does) or HTTPS, not file:// or a LAN IP. |
| USDZ export is refused | The model has rigs, instancing, multiple materials or vertex colors. Export GLB instead. |
| A 3MF prints at the wrong size | Set Millimeters per model unit to match the model's units before exporting. |
The site is static files with no build step. To serve it locally:
git clone https://github.com/Amal-David/meshy2glb.git
cd meshy2glb
./start.shThis serves the repository at http://localhost:8765/ using Python's built-in server. Set PORT to change the port.
Tests need Node 22:
npm ci
npm test # unit tests; also builds the extension
npm run test:legacy # decoder tests against .meshy files in tests/fixtures/
npx playwright install chromium
npm run test:browser # end-to-end export tests in Chromium
npm run benchmark # paint cleanup benchmark, writes docs/benchmark.jsontests/fixtures/ is git-ignored, so the .meshy fixture tests skip unless you add your own files there or point MESHY_FIXTURES at a folder of them.
CI runs all of the above on every push and pull request (test.yml). Pushing to main publishes the site through GitHub Pages; a second workflow (pages-smoke.yml) then checks that the live files match the commit. See docs/DEPLOYMENT.md.
index.html App page
src/
app.js UI wiring
input.js File, folder and URL input
model-loader.js Picks a loader and resolves companion files
decrypt.js .meshy → GLB (AES-256-CTR)
decompress.js meshopt decompression
glb.js GLB parsing and validation
viewer.js Three.js preview scene
export.js Export routes for each format
snapshot.js Bakes visible geometry into a static mesh
discovery.js Finds Three.js scenes on a page (extension)
paint-core.js Palette fitting and label cleanup
binary-cut.js Min-cut solver for two-color cleanup
contours.js, surface.js Splits the mesh along color boundaries
paint-adapter.js Three.js and 3MF output for painted models
vendor/three-mf/ 3MF writer from Texture2Paint (MIT)
extension/ Chrome extension source
scripts/ Extension build, benchmark, Pages check
tests/ Unit, legacy decoder and Playwright tests
docs/ Longer documentation
| Document | Contents |
|---|---|
| docs/ALGORITHM.md | Texture-to-paint method, limits and benchmark |
| docs/INTEGRATIONS.md | URL import, Asset Lens and the Chrome extension |
| docs/DEPLOYMENT.md | GitHub Pages setup and live-site check |
| docs/THIRD_PARTY.md | Reused code, licenses and attributions |
| NOTES.md | How the .meshy format was reverse engineered |
- three.js: rendering, loaders and exporters (MIT)
- meshoptimizer: mesh decompression (MIT)
- Texture2Paint: 3MF writer and cleanup reference (MIT)
- Oklab by Björn Ottosson: color space for palette fitting
- youssef02/meshy2glb, Pouare514/meshy-downloader, MeshySec and meshy-glb-downloader: earlier tools and ideas
Full details are in docs/THIRD_PARTY.md.
Not affiliated with Meshy AI.

