Wiki 9Minecraft Wiki 9Minecraft

Item Tags (minecraft:tags)

Group custom items using the minecraft:tags component for recipes, Molang queries, and Script API.

5Sections
4Code examples
3Known errors

Item tags allow you to assign categorical labels to your custom items using the `minecraft:tags` component. Instead of listing dozens of individual item identifiers in a crafting recipe, block mining speed rule, or script, you can check for a single tag. You will reach for item tags whenever you build custom toolsets, armor tiers, or ingredient families that need to behave like vanilla item groups.

Declaring Tags on a Custom Item

Tags are applied inside the `components` object of your behavior pack item file using the `minecraft:tags` component. This component accepts a single property, `tags`, which is an array of strings.

Every tag you write should follow the `namespace:tag_name` convention. When creating your own tags for pack-specific mechanics, always use your own namespace (such as `wiki:is_copper_tool`). When you want your custom item to integrate into vanilla systems—like letting a custom pickaxe mine stone properly or sit on a decorated pot shelf—you must use the `minecraft:` namespace.

BP/items/ emerald_pickaxe.json
{
  "format_version": "1.20.50",
  "minecraft:item": {
    "description": {
      "identifier": "wiki:emerald_pickaxe",
      "menu_category": {
        "category": "equipment",
        "group": "itemGroup.name.pickaxe"
      }
    },
    "components": {
      "minecraft:max_stack_size": 1,
      "minecraft:durability": {
        "max_durability": 850
      },
      "minecraft:tags": {
        "tags": [
          "minecraft:is_tool",
          "minecraft:is_pickaxe",
          "minecraft:diamond_tier",
          "wiki:emerald_gear"
        ]
      }
    }
  }
}

Built-in Vanilla Item Tags

Bedrock Edition assigns dozens of built-in tags to vanilla items and checks for them inside block definitions, entity behaviors, and crafting recipes. By adding these exact strings to your custom item's `minecraft:tags` array, you can piggyback on vanilla mechanics without rewriting vanilla files.

Tool and tier tags are the most important to know. Vanilla blocks check for tags like `minecraft:is_pickaxe` and tier tags like `minecraft:iron_tier` inside their `minecraft:destructible_by_mining` component (or hardcode the equivalent check) to decide whether a block drops its loot and how fast it breaks. Keep in mind that adding `minecraft:is_pickaxe` to your item does not automatically give it vanilla mining speeds against all blocks; you usually still need to configure the `minecraft:digger` component on your item, or ensure your custom blocks check for the tag.

TagWhat it doesNotes
minecraft:is_swordMarks the item as a sword.Used by combat queries and certain block-breaking checks like cobwebs or bamboo.
minecraft:is_pickaxeMarks the item as a pickaxe.Checked by custom blocks and vanilla mining rules.
minecraft:is_axeMarks the item as an axe.Used for wood-breaking speed checks and shield disabling.
minecraft:is_shovelMarks the item as a shovel.Checked by dirt, sand, and snow blocks.
minecraft:is_hoeMarks the item as a hoe.Checked by leaf and sponge blocks.
minecraft:wooden_tierAssigns wooden mining tier.Also exists for stone_tier, iron_tier, diamond_tier, golden_tier, and netherite_tier.
minecraft:logsGroups log blocks/items.Allows custom logs to be smelted into charcoal or crafted into generic wood recipes.
minecraft:planksGroups wooden planks.Lets custom planks craft sticks, chests, and crafting tables.
minecraft:music_discMarks the item as a music disc.Used by jukeboxes and Allay item-handling behavior.
minecraft:trim_materialsMarks item as valid armor trim material.Allows placement in the smithing table material slot.

Using Item Tags in Crafting Recipes

One of the cleanest ways to use item tags is inside shaped and shapeless crafting recipes. Instead of writing a separate recipe file for every single custom wood type or ingot variant in your add-on, you can replace the `item` field in a recipe key or ingredient list with a `tag` field.

When the player opens a crafting table, the recipe book will automatically cycle through every loaded item—both vanilla and custom—that carries that tag in its `minecraft:tags` component.

BP/recipes/emerald_stick_from_tag.json
{
  "format_version": "1.20.10",
  "minecraft:recipe_shaped": {
    "description": {
      "identifier": "wiki:emerald_rod"
    },
    "tags": ["crafting_table"],
    "pattern": [
      "#",
      "#"
    ],
    "key": {
      "#": {
        "tag": "wiki:emerald_gear"
      }
    },
    "unlock": [
      {
        "tag": "wiki:emerald_gear"
      }
    ],
    "result": {
      "item": "minecraft:stick",
      "count": 4
    }
  }
}

Checking Item Tags in Custom Blocks

If you create custom blocks with `minecraft:destructible_by_mining`, you can use `item_specific_speeds` to make tools mine the block faster. Rather than listing every vanilla and custom pickaxe by identifier, use a Molang query inside the `tags` condition to match any item carrying your target tags.

The `query.any_tag` and `query.all_tags` expressions inside the `item` object let you combine tool type and tier requirements in a single line.

BP/blocks/hardened_stone.json
{
  "format_version": "1.20.60",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:hardened_stone"
    },
    "components": {
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 10.0,
        "item_specific_speeds": [
          {
            "item": {
              "tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:diamond_tier')"
            },
            "destroy_speed": 1.5
          }
        ]
      }
    }
  }
}

Checking Item Tags with Molang and Script API

Outside of blocks and recipes, you can inspect item tags dynamically on entities and players. In Molang—such as inside animation controllers, render controllers, or entity filters—use `query.equipped_item_any_tag('slot.weapon.mainhand', 'wiki:emerald_gear')` to test if an entity is holding an item with at least one of the listed tags, or `query.equipped_item_all_tags` to require every tag listed.

If you are using the `@minecraft/server` Script API, the `ItemStack` class provides two built-in methods: `hasTag(tag: string)` which returns a boolean, and `getTags()` which returns an array of all tag strings currently on that item stack. This is much cleaner than maintaining large arrays of item IDs in your TypeScript or JavaScript files.

BP/scripts/check_tool.js
import { world, EquipmentSlot } from "@minecraft/server";

world.afterEvents.entityHitEntity.subscribe((event) => {
  const attacker = event.damagingEntity;
  const equippable = attacker.getComponent("minecraft:equippable");
  if (!equippable) return;

  const mainhandItem = equippable.getEquipment(EquipmentSlot.Mainhand);
  if (mainhandItem && mainhandItem.hasTag("wiki:emerald_gear")) {
    event.hitEntity.setOnFire(5, true);
  }
});

Which versions this applies to

Stable in format_version 1.20.50 and above without any experimental toggles. Prior to 1.20.50, tags were sometimes defined as empty `tag:name` keys inside the components list, which is now deprecated.

When it does not work

What you seeWhyThe fix
[Items][error]-wiki:emerald_pickaxe | minecraft:tags - invalid formatYou passed an array of strings directly to `minecraft:tags` (e.g., `"minecraft:tags": ["wiki:my_tag"]`) instead of wrapping the array inside the required `"tags"` object property.Change the component structure to `"minecraft:tags": { "tags": [ "wiki:my_tag" ] }`.
Content Log Error: Unknown component 'tag:minecraft:is_pickaxe'You are using the legacy component-key tag syntax (`"tag:my_tag": {}`) in an item file with a `format_version` of 1.20.50 or newer, where that syntax was removed.Move all `tag:*` keys into the `tags` array inside the `minecraft:tags` component.
Custom pickaxe with 'minecraft:is_pickaxe' tag still mines vanilla stone at hand speed.Adding `minecraft:is_pickaxe` tells queries and custom blocks that your item is a pickaxe, but vanilla stone blocks rely on the item having a `minecraft:digger` component (or custom script handling) to actually speed up mining on older/hardcoded vanilla blocks.Add the `minecraft:digger` component to your item alongside `minecraft:tags` and list the block tags (such as `stone` or `metal`) in its `destroy_speeds` array.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.