What is the X file format?
Files with the .x extension fall into the category of 3D model files created for the Microsoft Direct3D component of DirectX, first introduced in the second half of the 1990s.
The contents of .x files include data about three-dimensional objects. They are utilized by the Microsoft DirectX environment, which enables the display and animation of 3D objects. A key characteristic of the format is that it exists in two interchangeable encodings - human-readable ASCII text and compact tokenized binary - both sharing the same .x extension and opening with the four-byte magic signature xof . The files store all the information needed to represent 3D content, among which we can find:
- specifications of the object mesh (vertices and faces),
- texture coordinates and references to external texture image files,
- rendering rules and material properties,
- frame hierarchies and movements and animations of solids.
The content of .x files is used by the Microsoft DirectX environment, for example in computer games. This allows for the creation of realistic, virtual worlds in which the player's character moves. Objects stored in .x files are all elements of a three-dimensional scene. They can also be opened in popular programs for editing and creating 3D graphics such as Blender. However, in order to import .x files into applications such as 3ds Max or Maya, their contents must first be handled using dedicated Microsoft DirectX environment plugins.
Microsoft deprecated the .x format around 2014, recommending .FBX or .glTF for new projects. The format remains common in older DirectX game archives and modding communities.
Security & safety
RISK: LOWA DirectX .x file is passive geometry/material data and does not execute code, so it is not a typical malware vector. The realistic risks are practical: textures are referenced by filename, so a model can look untextured if its image files are missing; the format is deprecated, so some modern tools need an add-on or a converter. Beware fake 'X file viewer' download sites that bundle adware - use Blender or Assimp, which are open-source and free.
Format details
in a nutshell- Generic/temporary placeholder file - A bare '.x' is sometimes used as a throwaway extension by scripts or backups; content varies and is unrelated to DirectX.
- Lex scanner source (rare) - Some toolchains label Lex/Flex lexer source as '.x'; it is plain C-like text, opened in a code editor - see db_audit_notes.
Programs that open X files
Technical details
deep spec| Developer | Microsoft |
| Format type | Template-driven 3D model and scene file |
| MIME type | application/x-directx |
| Encoding | ASCII text or tokenized binary - both variants use the .x extension; encoding is declared in the 16-byte file header |
| File signature | "xof " (hex 78 6F 66 20) at byte offset 0 - present in all .x variants |
| Header structure | 16-byte header: bytes 0-3 "xof ", 4-7 version (e.g. "0303"), 8-11 format token ("txt "/"bin "/"tzip"/"bzip"), 12-15 float size ("0032" or "0064") |
| Float precision | 32-bit or 64-bit, declared in the header as "0032" or "0064" |
| Byte order | Little-endian (binary variant) |
| Template container | XOF template system - named, extensible data objects; supports custom application-defined templates |
| Compression | None for text (txt) and binary (bin) variants; optional MSZip compression in tzip and bzip variants |
| Core data objects | Mesh, MeshNormals, MeshTextureCoords, Material, Frame, AnimationSet |
| Texture handling | Textures referenced by filename only - not embedded inside the .x file |
| Typical file size | 10 KB - 50 MB, depending on mesh complexity, animation data, and number of objects |
| Primary platform | Windows (Direct3D / DirectX runtime) |
| Successor formats | Autodesk FBX and Khronos glTF/GLB - Microsoft deprecated .x and D3DX mesh utilities around 2014 |
| Released | 1996 (DirectX 2.0); binary variant added in DirectX 3.0 |
| Latest version | Last revised for Direct3D 9; deprecated by Microsoft from 2014 (use FBX/glTF instead) |
| Specification | learn.microsoft.com |
X conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about X files.