Tutorials/Command NBT tags

NBT tags can be specified for items and entities created with the and  commands. Each tag has the format : ; where describes what it does and is how much it applies. Multiple tags are separated by commas. (e.g.: ). The contents of List tags are enclosed in square brackets, while the contents of Compound tags are enclosed in curly brackets   – note that the entire data tag is itself a Compound tag (All within a set of  ). Tag names are case-sensitive, and white space is ignored. additionally, some tags are either true or false (Example: )

The player can quickly find data tags (NBT) without the use of external editors by using to figure out the data for each entity or block entity. See more about this in the article Commands/data.

See Entity format for the various NBT Tags that are saved for each entity. This page also contains basic information for each NBT Tag.

When None is used in a tag name that means that this tag can be put directly into the start of the dataTag.

Items
These can be used in and  commands as well as. For commands such as and, place them inside of a tag.

Example:

These tags can be used on any item.

The following table describes more details on Enchantments sub-tag. Example command:

The following table describes more details on display sub-tag. Example command:

The following table describes more details on the Fireworks sub-tag.

Blocks
These tags are put on blocks as items.

Entities
These tags are used when using the command to spawn entities or when using the  to edit the data of entities. The following table provides information on each tagname that can be added in an NBT Tag. These tagnames are specific to the command.

Villager
These tags are used when summoning villagers. (Can't be done in 1.14+)

Item Frame
These tags are used when summoning itemframes.

Potion
These tags are used to customize potions

Armor Stand
These tags are used when summoning armor stands.

Note: The Equipment tag also works for armor stands.

Turtle
These tags are used when summoning turtles.

Blocks
Tags used in and : Note: This is also used for Command Block Minecarts

Generic
These tags can be used on most tile entitied blocks

Spawner
These tags are used when using or  (spawner minecarts) to create spawners. Add only those data tags you want to avoid a potential error. Sub-tags used in the SpawnPotentials data tag.

Light Block
After 1.17 Light block has this tags:

Lightning Rod
After 1.17 Lightning rod has this tags: