Introduction
NBT, Named Binary Tag, is the tree-shaped data format that
Minecraft uses in many of its save files. It
goes back to early development versions of the game. Many files use .nbt or
.dat, such as level.dat; a text form is written as
.snbt.
Structure
Each tag has a type number, a name and a value. The thirteen types run from End (0) to
Long Array (12) and include numbers, strings, byte, int and long arrays, lists and
compounds, which hold further tags. Files are usually compressed with
gzip, sometimes with
zlib, and some are not compressed. Java Edition
writes numbers big-endian and Bedrock Edition little-endian; Bedrock’s
level.dat is uncompressed and starts with an 8-byte header.
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: the byte layout of each tag, the Bedrock network form and the text form, which the Minecraft Wiki describes.
- Viewer: the site has no viewer for this format.
Also used for
- LDraw part – A part or primitive of the LDraw brick library, in the same text format as models.
- TNEF (winmail.dat) – The winmail.dat attachment that wraps Outlook message properties and files.
- WFDB record – Header, signal and annotation files of physiological records.
- Windows registry hive (NTUSER.DAT) – A per-user registry hive when the file is NTUSER.DAT or USRCLASS.DAT; .dat is a generic extension.
Links
Software
- Minecraft – the game that writes these files
Reference
- NBT format – Minecraft Wiki