What Is an XNB File?

It might be related to a video game

What to Know

This article describes what XNB files are and how you can open one to either extract PNG files from it or save the audio to a different format.

What Is an XNB File?

A file with the XNB file extension is an XNA Game Studio Binary file. It's used to save original game files into a proprietary format.

In English: an XNB file is usually a compressed file full of images that appear in a video game created with XNA Game Studio, but they may also contain additional game data like audio files.

Some software might refer to these files as compiled asset files.

XNA logo.

How to Open an XNB File

The real source of XNB files is Microsoft XNA Game Studio, a tool that works with Visual Studio to help create video games for Windows, Windows Phone, Xbox 360, and the (now defunct) Zune. This program, however, isn't a practical tool to extract images from XNB files.

Your best bet is a program called XNB Extract, which is a portable tool (meaning no install is necessary) that extracts the PNG files from the compressed XNB file you're working with. To use it, copy the XNB file into the PACKED folder, return to the previous folder and open UnpackFiles.bat, and then locate the images in the UNPACKED folder.

You might also be able to open and/or edit XNB files with GameTools GXView.

If you've installed GameTools but can't find GXView, you can open it directly from the installation folder, almost always here: C:\Program Files (x86)\GameTools\GXView.exe.

How to Convert an XNB File

A regular file converter will not convert XNB files. The tools we already mentioned above are designed for getting image files out of one, which is probably what you're wanting to do.

However, you may also try TExtract, TerrariaXNB2PNG, or XnaConvert if the software from above doesn't help.

XNB to WAV lets you copy out the WAV sound file from an XNB file. If you want the WAV file to be in some other sound format like MP3, you can use a free audio converter.

Still Can't Open the File?

If the above tools don't open your XNB file, it's possible that yours has nothing to do with XNA Game Studio, in which case it's an entirely different format instead. The best thing to do is to see what folder the XNB file is stored in, which should provide some context that can help you determine the program that's using it.

One common reason for files not opening in the programs you think they should work with, is if you're misreading the file extension. For example, even though XMB and XNK files resemble the XNB file extension, neither are related and therefore don't open with the same programs.

Was this page helpful?