What is an XNB File?

How to Open, Edit, & Convert XNB Files

Picture of the XNA logo
© Microsoft

A file with the XNB file extension is a XNA Game Studio Express XNA Framework Content Pipeline 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 XNB files as compiled asset files.

How To Open an XNB File

The real source of XNB files is Microsoft XNA Game Studio, a tool that works with Microsoft Visual Studio to help create video games for Microsoft 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 Exporter, which is a portable (meaning no install is necessary) tool that extracts the PNG files from the compressed XNB file you're working with.

The easiest way to use this program is to copy the XNB file into the same folder as the program and then enter the file name of the XNB file without the file extension (e.g. file instead of file.xnb) in XNB Exporter, and then press Go for it!.

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

Note: 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.

Tip: Some file types are text-only files and can be opened and viewed with any text editor, like Notepad in Windows, or the popular Notepad++ program. This isn't the case with any Game Studio XNB file, but if the one you have is of a different format, this might be of some help.

If you do manage to get an XNB file opened with a text editor, but it's not entirely composed of text, there may be something within it that identifies the program used to create the file, which you then might be able to use to find a suitable program for opening it.

If the above tools don't open your XNB file, it's possible that yours has nothing to do with XNA Game Studio and isn't a plain text file, 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, and see if that context can help you determine the program that's using it.

If you find that an application on your PC does try to open the XNB file but it's the wrong application or if you would rather have another installed program open XNB files, see my How To Change the Default Program for a Specific File Extension guide for making that change in Windows.

How To Convert an XNB File

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

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

More Help With XNB Files

See Get More Help for information about contacting me on social networks or via email, posting on tech support forums, and more.

Let me know what kinds of problems you're having with opening or using the XNB file, what programs you've already tried to extract the images and other data from it, and I'll see what I can do to help.

More From Us