.XNB

Файл XNB

XNA Game Studio Compiled Content
Задать вопрос
БЫСТРЫЙ ОТВЕТ

An XNB file is a compiled game asset produced by Microsoft's XNA Framework or its successors MonoGame and FNA - a texture, sound, font, model, or data table packed for fast loading. You find them in the Content folder of games like Terraria and Stardew Valley. There is no standard double-click viewer; use a community unpacker like xnbcli to extract the contents to PNG, WAV, or JSON.

Разработчик: Microsoft (XNA Game Studio / Content Pipeline) Категория: Файлы игр MIME: application/octet-stream
ОТКРЫВАЕТСЯ НА Windows macOS Linux
Связанные: .OBB · .PAK · .ROFL · .PACKAGE

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Aug 29, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла XNB?

.xnb is a compiled binary file that stores a single game resource produced by the XNA Game Studio Content Pipeline. .xnb is a binary format and can contain images, audio data, 3D models, fonts, and many other resources. Source assets such as .png textures or .wav audio clips are compiled at build time into platform-optimized .xnb files that the game loads at runtime via Content.Load<T>().

Every .xnb file opens with the ASCII tag XNB, followed by a target-platform byte (w for Windows, x for Xbox 360, m for Windows Phone) and a format-version byte. An optional LZX or LZ4 compression flag is encoded in the same header.

XNA is a set of development tools for creating games for Microsoft Windows, Windows Phone, and Xbox systems. The XNA development environment was based on Visual Studio Express and was available for free, offering a rich set of tools and features for game developers. Microsoft discontinued XNA with version 4.0 in 2010, ending support around 2014. The open-source MonoGame and FNA frameworks continue to read and write the same .xnb format, keeping it relevant for titles like *Terraria*, *Stardew Valley*, and *Celeste*, which ship their art and audio as .xnb files.

Third-party tools, including xnbcli and XnbExtract, can unpack .xnb content back into editable source assets. Related XNA audio bank files use the .xsb and .xwb extensions.

Безопасность и защита

РИСК: LOW

An XNB is inert compiled game data - a texture, sound or data table - with no scripting or executable content, so opening or extracting one is not dangerous in itself. Two practical cautions: extracting or redistributing a game's assets is governed by that game's copyright/EULA (fine for personal mods, not for redistribution), and you should download XNB tools from their official repositories (GitHub) rather than random "xnb opener" sites, which are often ad/PUP traps since no legitimate standalone double-click viewer exists.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕXNA Game Studio Compiled Contentтакже известен как XNB content file, XNA Framework binary
РАЗРАБОТЧИКMicrosoft (XNA Game Studio / Content Pipeline)с 2006 (XNA Game Studio Express / XNA Framework 1.0)
КАТЕГОРИЯФайлы игр
MIME-ТИПapplication/octet-stream
ТИПBinary compiled game asset (texture, audio, model, font, sprite, etc.)
СВЯЗАННЫЕ.obb.pak.rofl.package
MAGIC BYTES · СИГНАТУРА ФАЙЛА
СМЕЩЕНИЕ
000102
HEX
584E42
ASCII
XNB
Every XNB begins with the ASCII tag "XNB" (58 4E 42). Byte 3 is the target platform: 'w' (0x77) Windows, 'm' (0x6D) Windows Phone/Mobile, 'x' (0x78) Xbox 360. Byte 4 is the format version (5 for XNA 4.0). Byte 5 is a flags byte whose high bit marks LZX/LZ4 compression of the payload that follows the header.

Программы, открывающие файлы XNB

Windows3 apps
XNB extractors (XnbExtract / xnbcli / XNB Exporter) Открытый код Drag .xnb files onto the tool to unpack them into PNG/WAV/JSON; repack edited assets back to .xnb. The realistic way to view or mod XNB content. xnbcli is actively maintained.
Microsoft XNA Game Studio (legacy) Бесплатно The original toolset that BUILDS .xnb via the Content Pipeline (needs Visual Studio). Legacy/unsupported; install only for historical or development work, not to 'view' a file. The db-recommended entry.
MonoGame Content Builder (MGCB) Открытый код The maintained successor to the XNA Content Pipeline - compiles source assets into .xnb and is used by developers building MonoGame games today.
macOS1 app
xnbcli Открытый код Cross-platform Node-based unpacker/repacker; run it from the terminal to extract .xnb assets to PNG/WAV/JSON on macOS.
Linux1 app
xnbcli Открытый код Cross-platform Node-based unpacker/repacker; run it from the terminal to extract .xnb assets to PNG/WAV/JSON on macOS.

Технические подробности

глубокая спецификация
File encodingBinary, little-endian byte order
Magic bytes0x58 0x4E 0x42 (ASCII "XNB") at offset 0
Header layout3-byte ASCII tag "XNB" + 1-byte platform code + 1-byte format version + 1-byte flags + 4-byte total file size (little-endian uint32)
Platform codes'w' (0x77) = Windows, 'x' (0x78) = Xbox 360, 'm' (0x6D) = Windows Phone/Mobile - encoded in byte 3 of every header
Format versionVersions 1-5; version 5 corresponds to XNA Game Studio 4.0 and is the version targeted by MonoGame and FNA
CompressionOptional - LZX (XNA 4.0) or LZ4 (some MonoGame builds); signalled by a flag bit in the header flags byte; payload is often stored uncompressed
Content types supportedTextures (DXT1/DXT3/DXT5/Color RGBA), audio (PCM/ADPCM), 3D models, bitmap fonts, compiled effect shaders, sprite sheets
Type-reader manifestHeader embeds a serialized list of ContentTypeReader class names the runtime uses to deserialize the asset object graph
Assets per fileOne primary asset per .xnb file; shared sub-resources are nested within the same file's serialized object graph
Texture surface formatsColor (32-bit RGBA), DXT1 (opaque 4:1 block-compressed), DXT3, DXT5 - GPU-native formats that reduce VRAM footprint at load time
Typical file sizeA few KB for small fonts or sprites; up to tens of MB for high-resolution textures or uncompressed audio tracks
Integrity checkTotal file size stored as a 4-byte little-endian field in the header for basic validation; no cryptographic checksum or hash is included
EncryptionNot encrypted - compiled assets are stored as plain binary data readable by any implementation that supplies the correct ContentTypeReader
MIME typeapplication/octet-stream (no dedicated MIME type registered for .xnb)
Content Pipeline roleRuntime output of the XNA/MonoGame Content Pipeline - source files (.png, .wav, .fbx, .spritefont) are compiled at build time into .xnb and loaded at runtime via Content.Load<T>()
Notable adoptersMonoGame and FNA (open-source XNA successors); used to ship assets in Terraria, Stardew Valley, Bastion, Fez, and Celeste
Выпущен2006 (XNA Game Studio Express / XNA Framework 1.0)
Последняя версияXNB format 5 (XNA Game Studio 4.0, 2010); same format reused by MonoGame/FNA
Спецификацияen.wikipedia.org

Конвертации XNB

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами XNB. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах XNB.

Часто задаваемые вопросы

What is an XNB file?
A compiled game asset from Microsoft's XNA Framework (or its successors MonoGame/FNA) - a texture, sound, font, model or data table packed for fast loading. You find them in the Content folder of games like Terraria and Stardew Valley.
How do I open or view an XNB file?
There's no normal double-click viewer. Use a community extractor like xnbcli or XnbExtract to unpack the .xnb into a PNG, WAV or JSON you can view, then repack if you're modding.
How do I edit an XNB file (mod a game)?
Unpack it with xnbcli to get the source asset (e.g. a PNG), edit that, then repack it to .xnb and drop it back into the game's Content folder. Some games offer modern modding APIs that read PNG/JSON directly instead.
Why won't my XNB file open in an image or audio player?
Because it's not a standard image or audio file - it's an XNA-compiled container with a type manifest the game's code understands. Extract it first with an XNB tool to get a normal PNG/WAV.
Can I still work with XNB files in 2026?
Yes. XNA itself is discontinued, but the open-source MonoGame and FNA frameworks still build and load .xnb, and maintained tools like xnbcli unpack and repack them.
What's the difference between .xnb and .xna?
.xnb is the compiled binary content the game loads; XNA is the framework/toolset that produces it. (.xna isn't a common asset extension - the asset files are .xnb.)

Ссылки

1Wikipedia - Microsoft XNAen.wikipedia.org
2MonoGame - Content Pipeline documentationdocs.monogame.net

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.SB3Scratch 3.0 Project File

Похожие расширения

.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

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z