Updated:

What an ID looks like

An ID such as minecraft:diamond_sword is a namespace plus a name. For vanilla items you can leave out minecraft:. IDs are lowercase English with underscores between words.

1. Tab suggestions (Java and Bedrock)

Type /give @p and a list of IDs appears. Keep typing, for example diamond, to filter it. On Java, press Tab to fill in the selection. This is fastest when you know part of the English name.

2. F3+H advanced tooltips (Java)

Hold F3 and press H. Hover over an item in your inventory and its ID appears under the name. Press again to turn it off. On laptops you may need Fn as well.

3. The debug screen for placed blocks (Java)

Press F3 and look at a block. "Targeted Block" on the right shows its ID and state.

4. Data of the held item (Java)

/data get entity @s SelectedItem

Shows the ID and components (name, enchantments and so on) of the item in your hand.

5. ID search

When you do not know the English name at all, use the ID search. It also shows items whose IDs differ between editions.

IDs that differ between Java and Bedrock

ItemJavaBedrock
Spawnerspawnermob_spawner
Snow layersnowsnow_layer
Snow blocksnow_blocksnow
Cobwebcobwebweb
Lily padlily_padwaterlily
Slime blockslime_blockslime
Jack o'Lanternjack_o_lanternlit_pumpkin

Using one edition's ID in the other can fail. Watch snow in particular: it is a snow layer on Java but a full snow block on Bedrock. Bedrock IDs are sometimes cleaned up in updates, so confirm with Tab suggestions.

IDs can change in updates

Java 1.20.3 renamed grass to short_grass, for example. If an ID from an older guide fails, look it up again with the methods above. See also give command not working.

Common questions

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.