Skip to content

DirectX X File Format (.x)

An X file is Microsoft's DirectX mesh format, storing geometry, materials, textures, skinning and animation as a set of typed data templates, in either a human-readable text encoding or a tokenised binary one.

.x3D Models

DirectX X at a glance#

Full nameDirect3D XFile
File extension.x
Category3D Models
DeveloperMicrosoft
First released1996
CompressionVaries from file to file
SpecificationX File Format Reference (DirectX 9)
FileFlip supportFileFlip reads and writes this format

What a .x file can hold#

These are the things a DirectX X file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Textures and materialsYes
Skeletons and animationYes

Strengths and limitations of DirectX X#

What DirectX X does well

  • Template-driven structure, so a file can carry custom typed data beyond the standard mesh and animation templates
  • Text and binary encodings both exist, and each can optionally be MSZip-compressed, so a file can be readable, compact, or smaller still
  • Widely used throughout the DirectX SDK samples, so a large body of 1990s and 2000s game content exists in this format

Where DirectX X falls short

  • The .x extension is badly overloaded, most notably by Lex lexical-analyzer source files, so the extension alone doesn't identify the format
  • Tied to Direct3D's old Retained Mode API, which Microsoft never updated past DirectX 3.0 and dropped from Direct3D 10 onward
  • No longer actively maintained; current DirectX and game pipelines have moved to FBX and glTF

Use X only to keep compatibility with older DirectX SDK samples or a legacy pipeline built around the format.

Convert X to FBX or glTF for any current game or graphics pipeline, since DirectX itself has moved on from the format.

How to open a .x file#

A .x file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts DirectX X into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
WindowsMicrosoft DirectX SDK viewer, Blender, Ultimate Unwrap3D
WebFileFlip

DirectX X questions people ask#

What is a DirectX X file used for?

An X file stores a 3D mesh for Microsoft's DirectX, including materials, textures, skinning and animation, laid out as a set of typed templates. It was the standard model format across the DirectX SDK samples through the 1990s and 2000s.

Is the X file format still used?

Rarely for new work. It's tied to Direct3D's Retained Mode API, which Microsoft stopped updating after DirectX 3.0 and later dropped outright, so current DirectX pipelines use FBX or glTF instead.

Why do some .x files look like source code instead of a 3D model?

The .x extension is shared with Lex lexical-analyzer source files on Unix systems, an unrelated format entirely. A text-encoded DirectX X file is also readable as plain text, but it starts with the header "xof" rather than Lex syntax.

Converting DirectX X files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.