Sword

Swords are craftable weapons used to damage mobs or other players and entities, or to block attacks (by holding the "use" key or right mouse button). Swords can also destroy certain blocks more quickly than any other tool (such as cobwebs).

Some monsters rarely drop a sword: Zombies (iron), Zombie Pigmen (golden), Wither Skeleton (stone). An iron or diamond sword can also be purchased from a villager blacksmith.

Uses
Swords are used to damage both mobs and players, or to block attacks. Upon damaging a mob or player, the sword's durability will decrease. A sword can also be used to destroy certain blocks more quickly than with fists. Using a sword to destroy any block that doesn't break instantly decreases its durability by the equivalent of two strikes to a mob.

Attacking a boat or a minecart with a sword will destroy it faster and will not decrease the sword's durability.

Damage
The following table summarizes the damage that swords of different materials inflict. Enchantments can change these statistics.

Critical hits add a damage bonus of up to 50% (rounded down), plus one heart.

The formula to find the minimum of the total lifetime damage is Durability × Damage per hit = Lifetime damage minimum. The formula to find the maximum is Durability × Critical Hits = Lifetime damage maximum.

Sword digging times
The following table shows the time it takes to break blocks on which swords have any effect. Colors indicate what will be dropped:
 * White: an original block.
 * Blue: block's normal drop (e.g. seeds, sapling, apple).
 * Red: nothing.

Combat
Despite its appearance, the sword grants no range advantage over any other tool, including bare hands.

Iron and stone swords kill most mobs in the same amount of hits. A diamond sword's damage of 4 over the iron sword's 3.5 is a much larger difference than the numbers imply, as it guarantees a kill of nearly any unarmored aggressive mob.

A way to use swords and other swung tools without being hit is to dig a trench such that the player's head is the same level as the mob's feet. The player must have blocks over his or her head so that mobs do not come into the trench. It is then possible to hit mobs without them seeing the player: this prevents mobs from retaliating. This method is efficient when defending a fortified building. It will not work against spiders unless slabs are placed on the ground in front of the trench, and skeletons at a distance may still have line of sight and keep shooting.

Unless the player engages in combat very frequently, swords in general will see a far longer useful life than a pickaxe or a shovel, which may mean swords are a more efficient use of rare resources (like diamonds and enchantments). Many players find that a diamond sword tends to outlast them, never being spent entirely but instead lost only due to accidental death.

Players with access to a bow and plentiful arrows will want to use them instead of swords for creeper combat when possible (especially on normal or hard), due to the range preventing the creeper from even beginning their detonation sequence. If you approach a creeper with a sword, use a hit-and-run tactic (run up, hit, run away until the hissing stops, then run forward and hit again). Swords with the knockback ("Knockback") enchantment aid these situations. When a mob is hit by the sprinting player, they are sent flying back further, which further increases the odds of a kill without much if any harm to the player.

A difficult but effective maneuver is sprinting towards the enemy before jumping and hitting in midair. This will both deal heavy damage and knock the mob far back, fall damage often finishing the mob off.

Ranged enemies like Skeletons and Ghasts will use knockback inflicted on them as an opportunity to fire, so knockback is a far less effective strategy when dealing with those enemies.

Swords are able to block attacks by holding the right mouse button. This will reduce damage from arrows as well as other projectiles, but will reduce the player to a speed slower than sneaking. Swords and all other player-dealt damage were also reduced by half a heart.

Trivia

 * The sword's texture came from Notch's abandoned RPG, Legends of the Chambered. The iron sword's texture was created first, as it was from the game, and the other swords followed.
 * It is possible to "farm" golden swords by crafting a bunch of easily renewable stone swords, and throwing them at zombie pigmen. There is a $33 1/3$ % chance that the zombie pigman will happily trade their golden sword with your stone one. Then kill the zombie pigman and get your sword back. This also works with skeletons for bows.
 * A Diamond Sword with the "Sharpness V" enchantment is powerful enough to kill most mobs with just one critical hit.
 * When blocking, the player's vertical movement speed does not decrease. This applies to flying, falling, swimming up or sinking, and climbing ladders.
 * A foam Iron Sword is one of the tools sold in the merchandise page of minecraft.net.
 * It is possible to stack Swords by entering the command (as long as cheats are enabled).
 * Before 1.4.2, any block that didn't require a pickaxe to drop could be mined about 50% faster with a sword.
 * If you obtain a sword enchanted with silk touch, you can use it to collect cobwebs, instead of getting string.