Updated:

The strongest bow (Java 1.21.5+)

/give @p minecraft:bow[enchantments={power:255,punch:5,flame:1,infinity:1},unbreakable={},custom_name="Strongest Bow"] 1

On 1.20.5–1.21.4 write enchantments={levels:{power:255,…}}. Earlier versions use NBT such as {Enchantments:[…]}.

Bow enchantments

EnchantmentIDNormal maxEffect
PowerpowerVMore arrow damage
PunchpunchIIKnocks targets back
FlameflameISets arrows on fire
InfinityinfinityIArrows are not used up (keep one)
UnbreakingunbreakingIIILasts longer
MendingmendingIXP repairs it

Very high Punch sends mobs so far you cannot collect their drops; 2–3 is easier for boss fights.

A fast crossbow

/give @p minecraft:crossbow[enchantments={quick_charge:4,multishot:1,piercing:10},unbreakable={}] 1

Give arrows too

An Infinity bow still needs one arrow: /give @p minecraft:arrow 1. Infinity does not work on crossbows, so give more.

Tipped arrows (Java 1.20.5+)

Instead of plain arrows, you can give arrows that apply a potion effect on hit.

# 16 arrows of Strong Poison
/give @p minecraft:tipped_arrow[potion_contents={potion:"minecraft:strong_poison"}] 16
# 16 arrows of Slowness
/give @p minecraft:tipped_arrow[potion_contents={potion:"minecraft:slowness"}] 16
# Spectral arrows make the target glow
/give @p minecraft:spectral_arrow 16

Bedrock Edition

/give @p bow
/enchant @p power 5
/enchant @p punch 2
/enchant @p flame 1
/enchant @p infinity 1
/enchant @p unbreaking 3

Hold the bow and enchant up to the normal maximums. Infinity and Mending cannot be combined; pick one.

Common questions

Check your command

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