Minecraft enchanted book generator: combine enchantments and cut the XP cost
Enchanted books are some of the most valuable items in Minecraft. They let you choose exactly which enchantments go on your weapons, armor and tools, with none of the randomness of an enchanting table. The catch is that combining many enchantments on an anvil gets expensive fast, and it is easy to run into "Too Expensive!" once the cost passes 39 levels. Our enchanted book generator takes care of that. You pick the enchantments, and the tool flags conflicts, works out the XP cost and suggests the best order to combine them in.
The tool has a full database of 40+ enchantments with descriptions and compatibility info. It runs entirely in your browser, so there is nothing to download or install. Once your book is set up, copy the ready-made /give command and use it in Creative mode or on a server.
How to use the enchanted book generator
It only takes a few steps:
- Filter the enchantments. Use the category buttons (Melee, Ranged, Armor, Tools, Universal) or the search box to find the enchantments you want quickly.
- Click an enchantment to select it. It lights up green. If it has several levels (for example Sharpness I-V), pick the level you want from the dropdown.
- Check for conflicts. Enchantments that clash with the ones you already picked are grayed out automatically and marked "Conflict". You can't add them to the same book.
- Read the combining order. The "Optimal combining order on the anvil" section shows step by step how to combine the books on an anvil to keep the XP cost down.
- Copy the /give command. The ready-made command gives you a book with all your enchantments right away in Creative mode.
What are enchanted books in Minecraft?
An enchanted book is a special item that stores one or more enchantments. Unlike enchantments applied straight to an item, a book is portable: you can stash it in a chest, trade it to another player or use it on an anvil whenever you like. That gives you a lot of flexibility when you plan your gear.
Enchanted books have one more big advantage: they can hold treasure enchantments, such as Mending, Frost Walker, Soul Speed or Swift Sneak. These never show up at an enchanting table. Depending on the enchantment, you find them in chests, buy them from a librarian or fish them up.
Where to get enchanted books
There are several ways to get enchanted books:
- Enchanting table: put a plain book on an enchanting table and spend XP. The enchantment is random, but you can improve your odds of a better result by placing bookshelves around the table (15 bookshelves is the maximum and gets you level 30 enchantments).
- Librarian villager: a villager with the librarian profession sells enchanted books for emeralds. You can reroll its offers by breaking its job site block (a lectern) and placing it again, until the enchantment you want turns up. It is the most reliable way to get a specific enchantment.
- Structure chests: chests in dungeons, abandoned mineshafts, strongholds, ancient cities and trial chambers can hold enchanted books with random enchantments. Bastion remnants have them too, but only with Soul Speed.
- Fishing: a fishing rod with Luck of the Sea III has a chance of catching an enchanted book as "treasure". Build an AFK fishing farm to collect books automatically.
- Piglin bartering: trade gold ingots to piglins and they can give you an enchanted book with Soul Speed.
Enchantment conflicts: what can't go together
Some enchantments exclude each other. You can't put them on the same item or combine them in one book. These are the main conflict groups:
- Sword damage: Sharpness conflicts with Smite and Bane of Arthropods. Pick one of the three.
- Armor protection: Protection conflicts with Fire Protection, Blast Protection and Projectile Protection. You can have only one type of protection on each piece of armor.
- Mining tools: Silk Touch conflicts with Fortune. You can't have both on one pickaxe.
- Bow: Infinity conflicts with Mending. You have to choose: infinite arrows or a bow that repairs itself.
- Crossbow: Multishot conflicts with Piercing.
- Trident: Loyalty and Channeling both conflict with Riptide.
- Mace (1.21+): Density conflicts with Breach, Sharpness, Smite and Bane of Arthropods.
How the anvil's "prior work" penalty works
Every time an item goes through an anvil (combining enchantments or repairing), its hidden "prior work" counter goes up. The prior work penalty is 2n - 1 levels, where n is the number of earlier anvil uses:
- 0 earlier uses: +0 levels of penalty
- 1 earlier use: +1 level of penalty
- 2 earlier uses: +3 levels of penalty
- 3 earlier uses: +7 levels of penalty
- 4 earlier uses: +15 levels of penalty
- 5 earlier uses: +31 levels of penalty
- 6 earlier uses: you hit the "Too Expensive!" limit (63 > 39)
The cost on the anvil is the prior work penalties of both items added together, plus the cost of the enchantments themselves. Every enchantment has its own cost multiplier. On a book, Mending has a x2 multiplier, so Mending costs 2 levels, while Sharpness V, with a x1 multiplier, costs 5 levels (level x multiplier).
Best combining strategy: the binary tree
The key to staying under the "Too Expensive!" limit is keeping the prior work penalty low. Instead of adding enchantments one after another (linearly), combine them in pairs:
- Step 1: combine 8 books into 4 pairs (each resulting book has prior work = 1)
- Step 2: combine the 4 results into 2 pairs (prior work = 2)
- Step 3: combine the 2 results into 1 book (prior work = 3)
- Step 4: combine the final book with the item you are enchanting (prior work = 4, penalty = 15)
With linear combining (adding one enchantment at a time), prior work climbs to 6 after 6 steps and the cost goes over the limit. With binary combining you fit the same 8 enchantments into 4 steps with prior work = 4 (a penalty of 15 levels). Our generator works out the best order for you automatically.
Best enchantment combinations for different items
Ideal sword (7 enchantments)
- Sharpness V (or Smite V against the undead)
- Knockback II
- Fire Aspect II
- Looting III
- Sweeping Edge III
- Unbreaking III
- Mending
Ideal pickaxe
- Efficiency V
- Fortune III (or Silk Touch)
- Unbreaking III
- Mending
Ideal armor: chestplate
- Protection IV
- Thorns III
- Unbreaking III
- Mending
Ideal bow (5 enchantments)
- Power V
- Punch II
- Flame
- Unbreaking III
- Mending (or Infinity, but remember they conflict!)
Treasure enchantments: what makes them different
Treasure enchantments are a special category that you can't get at an enchanting table. You get them from chests, librarians, fishing or bartering with piglins, depending on the enchantment. Here is the full list of treasure enchantments:
- Mending: repairs the item using experience orbs. Probably the most valuable enchantment in the game, so buy it from a librarian.
- Frost Walker: freezes the water under your feet into ice. Found in chests and sold by librarians.
- Soul Speed: makes you faster on soul sand and soul soil. Only from bastion remnants and piglin bartering.
- Swift Sneak: lets you move faster while sneaking. Only from ancient cities.
- Wind Burst: launches you upward after a smash attack with a mace. Only from trial chambers (1.21+).
- Curse of Vanishing: the item disappears when you die. You can find it, but you probably don't want it.
- Curse of Binding: the armor can't be taken off. Only useful for trolling in PvP.
Tips for advanced players
Librarian book farming
The best way to get a specific enchantment is to cycle a librarian's trades. Place a lectern next to an unemployed villager. It takes the librarian profession and offers a random enchanted book. If you don't like the offer, break the lectern, place it again and check the new offer. Repeat until the enchantment you want turns up. Once you make the first trade, the offer is locked in for good.
Enchanting order for a new sword
For a new netherite sword, first build all the enchantments into a single book on the anvil (using the generator above), and only then apply the final book to the sword.
Java Edition rules
Our generator is set up for Java Edition, including the 39-level "Too Expensive!" limit.
The /give command: how to use it
The /give command gives you an enchanted book instantly, in Creative mode or with operator permissions. The generator builds the whole command for you.
Copy the command from the generator, open the chat in game (T key) and paste it (Ctrl+V). The book appears in your inventory. Selectors: @p = nearest player, @s = the one running the command, @a = all players, @r = random player.
Frequently asked questions
How do you combine multiple enchantments on one book in Minecraft?
Use an anvil: put one enchanted book in the left slot and another in the right slot, and the enchantments move onto one book. The order is what matters: combine the more expensive enchantments in pairs first, then combine the results with each other. That keeps the "prior work" penalty down and helps you stay within the 39-level limit.
Which enchantments conflict with each other in Minecraft?
The main conflicts: Sharpness conflicts with Smite and Bane of Arthropods. Protection conflicts with Fire Protection, Blast Protection and Projectile Protection. Silk Touch conflicts with Fortune. Infinity conflicts with Mending. Multishot conflicts with Piercing. Riptide conflicts with Loyalty and Channeling.
What does "Too Expensive!" mean on an anvil?
The "Too Expensive!" message appears when an anvil operation would cost more than 39 experience levels in Java Edition. Every combine or repair on an anvil raises the item's "prior work" penalty, which is the penalty for earlier anvil uses. The penalty is 2^n - 1, where n is the number of earlier operations. A good combining order (the binary tree) helps you stay under the limit.
What is the best order for combining enchantments on an anvil?
Combine them like a binary tree: first in pairs (8 books become 4), then pairs of pairs (4 become 2), then 2 become 1. Put the more expensive enchantments (the ones with a higher cost multiplier) earlier. That keeps the total prior work penalty low and lets you fit 6-7 enchantments on one item.
What is the difference between an enchanted book and an enchantment from an enchanting table?
An enchanted book lets you pick the exact enchantment and level, while an enchanting table gives random combinations. You can find books in chests, buy them from a librarian or make them at an enchanting table. Some treasure enchantments (Mending, Frost Walker, Soul Speed) can't be rolled at an enchanting table at all.
How do you use the /give command to get an enchanted book?
Our generator builds the /give command for you. Pick your enchantments, click "Copy command", open the in-game chat (T key), paste the command (Ctrl+V) and press Enter. The command works in Creative mode or with operator permissions.
How many enchantments can one item have?
There is no hard limit on the number of enchantments per item, but the 39-level anvil limit and enchantment conflicts hold you back. In practice a sword can take 6-7 of them (Sharpness, Knockback, Fire Aspect, Looting, Sweeping Edge, Unbreaking, Mending).
Where can you find enchanted books in Minecraft?
You can find enchanted books in structure chests (dungeons, abandoned mineshafts, strongholds, bastion remnants, ancient cities), buy them from a librarian villager for emeralds, fish them up with a rod enchanted with Luck of the Sea, or make them yourself at an enchanting table. Trial chambers (1.21 and later) have a chance of holding rare enchantments.