Sword

Swords are craftable weapons used to damage mobs or other players, or to block attacks. Swords can also destroy certain blocks more quickly than any other tool (such as cobwebs). Attacking a boat or a minecart with a sword will destroy it faster and will not decrease the sword's durability. There are some monsters which can 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.

Crafting
The following table summarizes the damage that swords of different materials inflict.

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 x Damage per hit = Lifetime damage minimum. The formula to find the maximum is Durability x Critical Hits = Lifetime damage maximum.

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. This can be bad as it is better to use the proper tool for the block, than a sword, as a sword is generally used to damage players and mobs. If enchanted, a sword can hit more damage per hit depending on the enchantment.

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
The sword is a short range weapon - despite its appearance, it grants no range advantage over any other tool, including bare hands. In previous versions of Minecraft, swords inflicted more damage than bows - often significantly more depending on material, and even a wooden sword was on par with an arrow, but since the Beta 1.8 update the only sword that can match a full powered arrow (with a standard hit) is the diamond sword. A way to use swords without being hit (and thus closing the gap between swords and bows) 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.

High damage swords are primarily advantageous because they kill mobs/other players in fewer hits, defeating them faster and thereby reducing the chance of being damaged in return. But iron and stone words kill most mobs in the same amount of hits. 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 be expended in a few minutes of intensive excavation. This causes diamond swords in particular to last an extremely long time. Some players may find that this weapon can easily outlast them, being lost due to accidental death in lava or otherwise rendered beyond post-mortem retrieval long before it is actually used up. A diamond sword's damage of 4 over the iron sword's 3.5 is also a much larger difference than the difference between the numbers may imply as it guarantees a kill of any unarmored aggressive mob (or player) in fewer hits. The ability to kill rapidly is of greatest benefit against creepers when the time to act may be very short. These factors combined make a diamond sword a compelling investment.

The weaker swords are not recommended for creeper combat (especially on normal or hard) and there are strong arguments for using a bow, owing to its range (provided the bow is at full charge). If you approach a creeper with a sword, a recommended strategy is to use hit-and-run tactics on the creeper and run away until the hissing stops, then run forward and hit it again, as many times as necessary. Critical hits may also work with a stone-iron sword. With a diamond sword, however, one may simply charge at the creeper whilst swinging it, as the 3-hit-kill allows the player to kill the creeper prior to their "fuse" running out. Be wary, as this is a dangerous tactic that requires a bit of practice, and the creeper may move out of the way, often ultimately leading to the demise of the player. However, the hit-and-run tactic is not needed for a player who has a sword with a knockback enchantment.

With the ability to sprint added in Beta 1.8, swords became a more effective tool in combat: when a mob is hit by the player when sprinting, they are sent flying several blocks back. This is quite useful when fighting creepers. Charge at them in a sprint and hit them, they get knocked back to a safe distance before they could even initiate their self-destruct countdown, just repeat until the creeper dies. Just make sure there is room behind the creeper and that it does not get knocked back into an obstacle for maximum effect. This tactic basically eliminates the need to run backwards before going for another hit. This tactic is not recommended for tight areas such as caverns and other tight spaces, only do this when you encounter a creeper in the open.

A sword with the knockback enchantment is also viable for the hit-and-run tactic, as it sends any mob flying back a few blocks when hit. This can replace sprinting. If a diamond sword is being used, this can make creeper disposal very easy. Along with the sprint tactic, this is not recommended for use against skeletons, as it grants them a free shot while you continue to approach them.

Players are advised to make use of the critical hit ability of the sword to dispatch mobs, especially creepers, quickly. A difficult, but effective maneuver is a combination of both knock-back and critical hits, sprinting towards the enemy before jumping and landing a blow on them before landing. This will both deal heavy damage and knock the mob far back, fall damage often finishing the mob off. Sprinting is also good for closing the distance on skeletons and ghasts, but make sure to not hit them while you are sprinting or they will get knocked back, allowing them a free shot at range.

As of Beta 1.8, swords are able to block attacks by holding the right mouse button. This will block 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 in the 1.8 update (like before Beta 1.5).

As of 1.5, death messages will display what weapon, in this case the sword, was used to kill a player. If the sword used was renamed by using an anvil, that name will be displayed in the death message. For example: Noob was slain by Steve using Fire Sword.

Trivia

 * 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.
 * Wither Skeletons, Zombie Pigmen, and Zombies can drop swords as a rare drop.
 * Swords are held as tools. This means that they look more like they are in one's fist, and stick out farther.
 * 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 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.
 * 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.