Free glTF test files and sample generator
The JSON-based transmission format for 3D scenes, used by the web and game engines. Generate valid .gltf sample files for viewers, importers and asset pipelines.
What is a .gltf file?
GLTF: glTF 2.0 3D Scene. glTF is the transmission format for 3D scenes on the web, JSON describing a scene graph, with geometry either embedded or referenced. It is often called the JPEG of 3D, and it is what browsers and game engines load directly.
Why generate a test glTF file?
- Test a web 3D viewer or asset pipeline.
- Verify JSON scene-graph parsing and buffer handling.
- Check that embedded data URIs are decoded correctly.
What you can put inside a .gltf file
You get 2 content options for glTF, so the file holds something meaningful rather than random padding: Solid mesh, Point cloud. For glTF these are alternatives, so choose the one that matches what you need to test.
How a .gltf file is identified
A .gltf file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How the size lands on the exact byte
glTF reserves an `extras` object for application data, so the padding is a string inside it and the model still loads.
Negative testing with broken glTF files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed. Same length as the valid file.
- Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation, and for this format's encodings, UTF-16 and BOM test files.
Sample glTF content
{
"asset": { "version": "2.0" },
"scene": 0,
"scenes": [{ "nodes": [0] }],
"nodes": [{ "mesh": 0 }]
}This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Drop into an online glTF viewer, Windows 3D Viewer, Blender or Babylon.js Sandbox.
Media type model/gltf+json · extension .gltf · category 3D
Generate a .gltf file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about glTF files
What identifies a .gltf file?
Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How can a .gltf file be an exact number of bytes?
glTF reserves an `extras` object for application data, so the padding is a string inside it and the model still loads.
What can go inside the glTF file?
There are 2 content options for .gltf: Solid mesh, Point cloud. For glTF these are alternatives, so pick the one matching what you need to test.
Can I download several broken glTF files at once?
Yes, select more than one File Condition and you get one ZIP containing a .gltf per condition, each named after its condition.
Can the glTF file use UTF-16 or a byte-order mark?
Yes. .gltf is a text format, so it can be generated as UTF-8, UTF-8 with a byte-order mark, UTF-16 LE or UTF-16 BE. The body is shortened before re-encoding so the finished file still lands on the exact size you asked for. Note that a UTF-16 file always has an even byte count.
How do I open or verify the glTF file?
Drop into an online glTF viewer, Windows 3D Viewer, Blender or Babylon.js Sandbox.