What is MIME type "model/gltf-binary"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

model/gltf-binary signals a file that carries 3D scene data in a compact, binary form. It is part of the glTF (GL Transmission Format) family and is optimized for quick loading and efficient rendering.

The binary nature means all 3D geometry, animations, textures, and other scene elements are stored together. This minimizes the number of files to load and speeds up processing in real-time apps such as games and virtual reality.


Files using this type include the binary format like GLB. In some contexts, the JSON-based version with a GLTF extension is also mentioned as part of the glTF family, even though it employs a different MIME type.

For detailed technical insights, check the glTF specification.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: model/gltf-binary    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="model/gltf-binary">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'model/gltf-binary');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Which file extension uses the model/gltf-binary MIME type?

This MIME type is primarily associated with the .glb file extension. While standard .gltf files are JSON-based, the .glb format is a binary container that bundles geometry, textures, and animations into a single file for efficient distribution.

How do I configure Apache to serve GLB files correctly?

To serve these files with the correct headers, add the following line to your .htaccess file or main configuration: AddType model/gltf-binary .glb. This prevents browsers from misinterpreting the binary data as text.

What is the difference between model/gltf-binary and model/gltf+json?

model/gltf-binary (used for .glb) stores data in a compact binary format, embedding textures and mesh data directly. In contrast, model/gltf+json (used for .gltf) is human-readable text that often references external image files.

Why am I getting a 404 error when loading a .glb file on IIS?

Microsoft IIS does not serve unknown file types by default. You must add a custom MIME type mapping in the IIS Manager or your web.config file, setting the extension .glb to model/gltf-binary.

Can web browsers display model/gltf-binary files natively?

Browsers require a WebGL rendering engine to display these files. Popular libraries like Three.js, Babylon.js, or the <model-viewer> web component use this MIME type to render interactive 3D content directly in web pages.

How do I add support for GLB files in Nginx?

Open your mime.types file (usually located in /etc/nginx/) and add the line model/gltf-binary glb;. After saving the file, reload Nginx to apply the changes.

Is model/gltf-binary safe to open?

Generally, yes, as it contains 3D scene data rather than executable code. However, like any media format parsed by complex graphics drivers, it is important to keep your browser and graphics drivers updated to avoid potential buffer overflow vulnerabilities.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.