Can you put Knockback on an axe?
No. You can't put Knockback on an axe in Java 26.3, not even with an anvil.
Why not
Knockback is not on the axe's list. Here is what an axe can take instead: Curse of Vanishing, Sharpness, Smite, Bane of Arthropods, Fortune, Silk Touch, Efficiency, Unbreaking, Mending.
What that means in practice
Knockback only goes on swords and spears. Axes don't need it much: they hit hard and disable a raised shield on their own. For pushing mobs away, a Knockback sword or a Punch bow does the job.
What to use instead
Knockback only goes on swords and spears. Axes hit hard on their own, which is often more useful than pushing enemies away. On a fresh axe, Sharpness V costs 5 levels as a book.
If you just want space in a fight, there are other tools. Punch on a bow pushes targets away at range, and wind charges knock mobs back without any enchantment.
Why the game says no
Knockback only goes on sword and spear. An axe is not on that list. That matters because each enchantment's data file lists the items it supports, and the anvil checks that list. So the anvil gives no result, and the enchanting table never offers it.
No survival trick changes that. Combining two items, renaming or using a grindstone first all leave the list the same.
The best axe build instead
So a max axe has Sharpness V, Fortune III, Efficiency V, Unbreaking III and Mending. In the cheapest order it costs 32 levels over 5 anvil steps, and no step goes above 11. Open it in the calculator.
The best axe enchantments page explains every book, and the axe enchant order shows each anvil step.
Where Knockback goes
- Knockback goes on sword and spear. The enchanting table can offer it on both.
Commands and creative mode
The /enchant command refuses too, because an axe can't support Knockback. Only /give with the enchantments component can attach it, which makes a command-only item that survival can never produce. The command generator writes the right syntax for your edition.
Java and Bedrock
As far as the item list goes, the answer is also the same in Java and Bedrock. The anvil differs, though: Java charges the full new level of every book. This page follows Java 26.3.
About Knockback
Knockback pushes the mob you hit further away. Each level adds one level of knockback strength on top of the normal hit.
Knockback has a max level of II. If you need a book, you can get it from the enchanting table, librarian villagers, gear worn by trial chamber mobs, ominous vaults (trial chambers) and enchanted loot from fishing and chests. A librarian sells a Knockback II book for 8 to 32 emeralds. Before you buy, read everything about Knockback, including what each level does.
What else an axe can take
Instead, an axe can take Sharpness, Smite, Bane of Arthropods, Fortune, Silk Touch, Efficiency, Unbreaking and Mending. Then the best axe enchantments page ranks them and gives the max build.
Related questions: Sharpness on axe, Looting on axe, Smite on axe, Fire Aspect on axe, Efficiency on axe.
Questions
Can you put Knockback on an axe?
No. You can't put Knockback on an axe in Java 26.3, not even with an anvil.
What else can Knockback go on?
sword and spear.
Can a spear have Knockback?
Yes. Knockback goes on swords and spears, so a spear can push targets back.
How do I get knockback on an axe?
You can't with an enchantment. Use a Knockback sword or spear, or a Punch bow, instead.
Is Knockback worth it?
It is a matter of taste. It keeps mobs away, but it also pushes them out of reach.
Can an axe get Knockback from an enchanting table or a villager?
No. The enchanting table only offers enchantments an item supports. A villager's Knockback book still can't go on an axe, because the anvil checks the same list.