.X

X File

DirectX 3D Model File
Ask a question
QUICK ANSWER

An X file is a Microsoft DirectX 3D model storing mesh geometry, materials, texture references, and optional animation. Open it with Blender (plus a DirectX import add-on) or the free Assimp tool. The format was deprecated in 2014; convert to FBX or glTF for use in modern software.

Developer: Microsoft Category: 3D Image Files MIME: application/x-directx
OPENS ON Windows macOS Linux
Related: .DCM · .STEP · .SKP · .STP

On this page

19k+ extensions indexed
Last reviewed Jul 28, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

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: LOW

A 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
FULL NAMEDirectX 3D Model Fileaka Direct3D .X file, DirectX mesh file
DEVELOPERMicrosoftsince 1996 (DirectX 2.0); binary variant added in DirectX 3.0
MIME TYPEapplication/x-directx
TYPETemplate-driven 3D model/scene file (ASCII text or tokenized binary)
This extension is also used by…
  • 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.
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
786F6620
ASCII
xof
Every DirectX .x file starts with the 4-byte magic "xof " (78 6F 66 20). Bytes 4-7 are a version (e.g. "0303" = 3.3), bytes 8-11 give the format type - "txt " for ASCII text or "bin " for tokenized binary (also "tzip"/"bzip" for MSZip-compressed variants), and bytes 12-15 the float size ("0032" or "0064"). So a text file begins literally with "xof 0303txt 0032".

Programs that open X files

Windows4 apps
Blender Open-source Install a DirectX (.x) import add-on (e.g. the community 'DirectX Importer'), then File > Import > DirectX (.x). Free.
Autodesk FBX Converter Free Legacy free Autodesk tool: load the .x and export to FBX/OBJ/DAE for modern apps.
Assimp Viewer (Open Asset Import Library) Open-source Drag the .x onto the Assimp viewer to inspect it, or use 'assimp export model.x out.obj' to convert.
DirectX SDK Mesh Viewer (legacy) Free The historic DirectX SDK shipped a mesh viewer; functional but unsupported/EOL - use Blender/Assimp instead.
macOS2 apps
Blender Open-source With a DirectX import add-on enabled, File > Import > DirectX (.x). Then export to FBX/glTF.
Assimp Open-source Build/install Assimp and run 'assimp export model.x out.fbx' from Terminal.
Linux2 apps
Blender Open-source Enable a DirectX (.x) importer add-on, then File > Import > DirectX (.x).
Assimp Open-source assimp export model.x out.gltf - converts the legacy mesh to a modern format.

Technical details

deep spec
DeveloperMicrosoft
Format typeTemplate-driven 3D model and scene file
MIME typeapplication/x-directx
EncodingASCII 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 structure16-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 precision32-bit or 64-bit, declared in the header as "0032" or "0064"
Byte orderLittle-endian (binary variant)
Template containerXOF template system - named, extensible data objects; supports custom application-defined templates
CompressionNone for text (txt) and binary (bin) variants; optional MSZip compression in tzip and bzip variants
Core data objectsMesh, MeshNormals, MeshTextureCoords, Material, Frame, AnimationSet
Texture handlingTextures referenced by filename only - not embedded inside the .x file
Typical file size10 KB - 50 MB, depending on mesh complexity, animation data, and number of objects
Primary platformWindows (Direct3D / DirectX runtime)
Successor formatsAutodesk FBX and Khronos glTF/GLB - Microsoft deprecated .x and D3DX mesh utilities around 2014
Released1996 (DirectX 2.0); binary variant added in DirectX 3.0
Latest versionLast revised for Direct3D 9; deprecated by Microsoft from 2014 (use FBX/glTF instead)
Specificationlearn.microsoft.com

X conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with X files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about X files.

Frequently asked questions

What is a .x file?
In this 3D context it's a Microsoft DirectX 3D model - mesh geometry, materials, texture references and optional animation, used by older Direct3D games and tools. It comes in text or binary form, both starting with 'xof '.
How do I open a DirectX .x model?
Use Blender with a DirectX (.x) import add-on, or the Assimp viewer. Both are free; from there you can export to a modern format like FBX, OBJ or glTF.
How do I convert a .x file to OBJ or FBX?
Import the .x into Blender or run Assimp ('assimp export model.x out.obj' / out.fbx). The Autodesk FBX Converter can also load .x and export FBX/OBJ.
Is the .x format still used?
It's deprecated - Microsoft stopped developing it around 2014 in favour of FBX, and glTF is the modern standard. You'll still see .x in older games and modding communities.
What's the difference between text and binary .x files?
Both use the same templates and extension; the 16-byte header declares 'txt ' (human-readable ASCII) or 'bin ' (tokenized binary). They are interchangeable - most importers read both.
Why does my .x model open with no textures?
The .x references texture image files by name rather than embedding them. Make sure the referenced images sit alongside the model, or re-link them in your 3D app.

References

1Microsoft Learn - X Files (Legacy) (Direct3D 9)learn.microsoft.com
2fileformat.com - X (DirectX file format)docs.fileformat.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.DATProgram Data File (generic)
4.PARTPartial Download File
5.EXEWindows Executable (Portable Executable)
6.RPMSGRestricted Permission Message
7.BINCD/DVD Disc Image (BIN/CUE)
8.DLLDynamic Link Library
9.JSONJavaScript Object Notation file
10.XDWDocuWorks Document

Related extensions

.DCMDICOM Medical Image
.STEPSTEP - Standard for the Exchange of Product Data (ISO 10303)
.SKPSketchUp Document
.STPSTEP - Standard for the Exchange of Product Data (ISO 10303), .stp spelling
.MTLMaterial Template Library (Wavefront)
.MAX3ds Max Scene File (Autodesk 3ds Max)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z