XGL / ZGL .xgl

An XML wrapper around OpenGL calls. CAD viewer exports.

What an .xgl file holds

XGL encodes a scene as XML mirroring the OpenGL calls needed to draw it, with .zgl as the gzip-compressed variant. CAD packages emitted it for lightweight viewing and design review, a way to hand somebody a model to look at without handing over the parametric CAD data behind it.

Also seen as .zgl.

Commonly seen in: CAD viewers, design review tools, legacy engineering exports.

DataStored in XGL
GeometryYes
Materials and colourYes
Texture mapsNo
Animation and rigsNo
Scene hierarchyYes
Read hereYes
Written hereNo

Tested against a real file

The last sweep loaded sample_official.xgl from Assimp test models with its 1 sidecar files through the viewer on this site: 24 triangles across 2 meshes and 1 materials, in 2.0 seconds. Every format's result is on the test results page, run 2026-09-08.

Convert XGL to another format

Every pairing has a page saying what survives the trip.

Other things to do with an .xgl file

Questions about XGL

How do I open an .xgl file?

Drop it into the viewer on this site and it opens in the browser, with the scene tree, the materials and the mesh statistics. Nothing is uploaded. If you want it in another program instead, convert it to GLB, which almost everything reads.

Is XGL a good format to archive in?

XGL stores geometry, materials and colour, scene hierarchy. Anything outside that list will not be in the file at all, so archive the original alongside it if the surfacing or the rig matters.

Does converting XGL lose quality?

Geometry is copied vertex for vertex, so the shape does not degrade. What gets lost is whatever the target format has no field for: convert to STL and the materials go, convert to OBJ and the animation goes. The comparison table on each converter page says exactly which.

Formats that hold the same things

Or go back to the full format reference.