Data Command Generator

Read, modify, merge, or remove NBT data on blocks, entities, and storage — directly tweak chest contents, mob health, or internal tags (Java only)

Must resolve to exactly one entity, e.g. @e[type=zombie,limit=1]

Leave blank to read all data.

Only applies when an NBT path is also given — useful for storing decimal values into a scoreboard.

What is NBT

Every block and entity in the game has a hidden "data sheet" called NBT — it holds things like current health, chest contents, a custom name, or other internal tags. The /data command is the direct door into reading and editing that sheet.

  1. Try get without a path first to see what tags the target has.
  2. Copy a tag name you see into the NBT path field, e.g. Health or Inventory[0].id
  3. Use modify to edit one tag at a time, or merge to push several tags in at once.

Caution: /data works on one entity at a time. If you use @e or @a you must add limit=1 as well. If you want to affect several entities at once, wrap it with the Execute command like execute as @e[...] run data ...

The system only checks that the NBT braces and quotes are structurally valid — it does not verify that a tag actually exists on that item or entity, since tag lists vary by type and version. Test it in a sandbox world before using it for real.

/data exists only on Java Edition — Bedrock has no NBT command. storage has existed since Java 1.15, so it is only enabled for the Java 1.21.x profile.

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Read your own NBT data

The quickest way to see how an entity’s data is shaped before writing a command that changes it

/data get entity @s

What it does Will print all NBT data of themselves (whoever runs the command) to chat (this changes nothing).

2. Read one specific value

A path pulls out a single value instead of dumping the whole blob, which is hard to read

/data get entity @s Health

What it does Will read the value of the tag "Health" from themselves (whoever runs the command) — pair it with /execute store to save it into a scoreboard.

3. Write a value into your own storage

Storage is not attached to any entity or block, which makes it the natural home for datapack state

/data modify storage minecraft:mydata round set value 1

What it does Will overwrite the tag "round" of storage "minecraft:mydata" with the value 1.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Every version this tool supports produces the same result, so a command you copy works without version-specific edits

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Java Edition 1.13 - 1.20.4 (legacy NBT)
/data get entity @s

Before you use these