.DEM

DEM File

Recorded Game Demo File
Ask a question
QUICK ANSWER

A DEM file is a recorded game replay that stores player inputs and network snapshots - not video frames. You watch it by placing it in the matching game's folder and using the in-game demo player (e.g. Counter-Strike 2, Half-Life). No standalone media player can open it. To get an MP4, play the demo in the game and record your screen.

Developer: Valve (GoldSrc / Source engine; format also used by id Software and others) Category: Game Files MIME: application/octet-stream
OPENS ON Windows macOS Linux
Related: .OBB · .PAK · .ROFL · .PACKAGE

On this page

19k+ extensions indexed
Last reviewed Jul 4, 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 DEM file format?

.dem files store gameplay recordings (commonly called demos) captured by the game engine during a live match or scripted sequence. The format is most closely associated with first-person shooters, particularly games running Valve's GoldSrc and Source engines, though the extension first appeared in id Software's Quake engine in the mid-1990s.

.dem files contain gameplay replay data recorded on the game engine: timestamped network snapshots, player input commands, and game events that allow the engine to reproduce the match in full.

There are two main types of .dem recordings:

  • Player or server recorded replay - a live match recorded using the record console command or by an HLTV relay server. Competitive players use these for personal review, highlights, and anti-cheat submission.
  • Pre-scripted showcase demo - a non-interactive sequence consisting of prerecorded gameplay elements shown from various camera perspectives. This type is typically used for engine performance showcases and in-game attract screens shipped with the game.

.dem files can store both types of gameplay recordings.

A .dem file is not a video file - it stores raw game state that only the matching game engine and build can replay. To produce a watchable video you must play the demo back inside the game and capture the output with a screen recorder or a tool like HLAE.

Multiple distinct .dem formats share the extension, each identified by its file header: GoldSrc demos begin with HLDEMO\0, Source engine demos with HL2DEMO\0, and Source 2 demos (CS2, Dota 2) with PBDEMS2\0. Because the demo protocol version and network protocol version are stored in the header, files are engine- and build-specific - a Source 1 demo will not play back in Source 2.

.dem recordings are used throughout the competitive scene for match analysis, content creation, and anti-cheat review. Related formats include .VDM demo script files and .REP replay files.

Security & safety

RISK: LOW

A game .dem is passive replay data parsed by the game engine, so risk is low - it can't run code on its own. Only play demos in the matching official game build; a corrupt or wrong-version demo simply fails to load. Be wary of sites offering "DEM to MP4 converter" downloads - there is no such direct converter, and those are often bundled adware; use the game's own recording tools or OBS instead.

Format details

in a nutshell
FULL NAMERecorded Game Demo Fileaka Game demo recording, Source/GoldSrc demo
DEVELOPERValve (GoldSrc / Source engine; format also used by id Software and others)since 1996-1998 (Quake/GoldSrc era); Valve Source DEM since 2004
CATEGORYGame Files
MIME TYPEapplication/octet-stream
TYPEBinary recorded game-input/network-snapshot replay (binary)
This extension is also used by…
  • USGS DEM (Digital Elevation Model) - A terrain-elevation raster used in GIS/mapping - completely unrelated to game replays; opened in QGIS/ArcGIS.
  • Quake / Hexen / Descent demo - Older single-game demo recordings sharing .dem; each replays only in its own engine.
  • VirtualDub project / misc - Occasionally seen as a non-game .dem; identify by the application that created it.
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304050607
HEX
484C3244454D4F00
ASCII
HL2DEMO·
Valve Source-engine demos begin with the 8-byte magic "HL2DEMO\0". GoldSrc (Half-Life 1 / CS 1.6) demos begin with "HLDEMO\0". Source 2 (CS2/Dota 2) demos begin with "PBDEMS2\0". Quake/Hexen-era .dem files have no fixed ASCII magic. Because many games reuse .dem, the header identifies which engine produced it.

Programs that open DEM files

Windows3 apps
Counter-Strike 2 / CS:GO (Source) Free Put the .dem in the game's csgo/ (or csgo) folder, open the console and run 'playdemo <name>' or use the in-game Watch/demo UI.
Half-Life / Counter-Strike 1.6 (GoldSrc) Paid Place the GoldSrc .dem in the mod folder and run 'playdemo <name>' in the console - plays only HLDEMO-format demos.
HLAE (Half-Life Advanced Effects) Open-source Companion tool for Source demos: precise camera/recording control to render demos to high-quality video. Use alongside the game.
macOS1 app
Counter-Strike 2 (Source) Free Open the demo through the in-game Watch UI; demos replay inside the engine that recorded them.
Linux1 app
Counter-Strike 2 (Source) Free Place the .dem in the game folder and use 'playdemo' / the in-game demo UI.

Technical details

deep spec
File typeBinary game-state and network-snapshot replay recording
Byte orderLittle-endian
File magic (Source engine)HL2DEMO\0 - 8 bytes at file offset 0
File magic (GoldSrc engine)HLDEMO\0 - 7 bytes at file offset 0
File magic (Source 2)PBDEMS2\0 - 8 bytes at file offset 0; used by CS2 and Dota 2
CompressionNone (GoldSrc and Source 1); protobuf + Snappy (Source 2)
Typical file sizeA few hundred KB to several hundred MB depending on match length
Internal version fieldsDemo protocol version and network protocol version stored in the header, tied to the specific game build
Playback requirementMust be opened in the matching engine and a compatible game build; not cross-engine or cross-version
Map integrity checkBSP map CRC may be embedded in the header for consistency verification
MIME typeapplication/octet-stream
StructureHeader (magic, protocol version, map name, game directory, playback time) followed by a stream of timestamped frame and command packets
Supported platformsWindows, macOS, Linux (varies by game title)
Primary developerValve Software (GoldSrc and Source engines); id Software (original Quake-era format)
Released1996-1998 (Quake/GoldSrc era); Valve Source DEM since 2004
Latest versionSource 2 demo (protocol-specific; e.g. CS2 .dem, 2023)
Specificationdeveloper.valvesoftware.com

DEM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DEM 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 DEM files.

Frequently asked questions

How do I watch a .dem file?
Play it back inside the game that recorded it. For Source games (CS2/CS:GO) put the .dem in the game folder and use the in-game Watch/demo UI or 'playdemo <name>' in the console. A .dem is a replay, not a video, so it only opens in that game.
How do I convert a .dem to MP4?
There's no direct converter. Play the demo in the game and record it - use the engine's 'startmovie' command or HLAE for clean output, or capture with OBS Studio. That produces an MP4/AVI of the replay.
Why won't my .dem file play?
Demos are engine- and version-specific. A CS:GO demo won't play in CS2, a GoldSrc demo won't play in Source, and a Quake demo won't play in Half-Life. You must use the exact game and build that recorded it.
Can I open a .dem in a video player like VLC?
No. A game .dem contains player inputs and network state, not video frames, so media players can't read it. Play it in the game and screen-record to get a video.
Is a .dem the same as a video recording?
No - it's much smaller because it stores only the data to re-simulate the match in-engine, which also lets you change camera angles during playback. You convert it to a real video by recording the playback.
My .dem is terrain/elevation data, not a game - what is it?
Then it's a USGS Digital Elevation Model, an unrelated GIS format that happens to share the .dem extension. Open it in QGIS or ArcGIS, not a game.

References

1Wikipedia - Demo (computer games)en.wikipedia.org
2Valve Developer Wiki - DEM Formatdeveloper.valvesoftware.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.MDMarkdown Document
4.PARTPartial Download File
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.OBBAndroid Opaque Binary Blob (APK Expansion File)
.PAKGame Resource Package (PAK)
.ROFLLeague of Legends Replay
.PACKAGEThe Sims / Maxis DBPF Package (game content & mods) - dominant meaning
.XSBXACT Sound Bank
.SAVSaved Game File

Free file tools

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

Open the toolbox

Browse file extensions A-Z