Zombified Piglin

Zombie pigmen are undead neutral mobs that mainly inhabit the Nether.

Java Edition
Zombie pigmen can spawn in the Nether, from nether portals, or from pigs struck by lightning. They have a 5% chance of spawning as a baby zombie pigman. Baby zombie pigman have a 5% chance of spawning as a chicken jockey.

All zombie pigmen spawn with a golden sword, which has a small chance of being enchanted: from 0 to 25%. This chance increases at higher difficulties, and the sword's enchantment is usually a higher level, from 5 to 19.

On Halloween (October 31), zombie pigmen have a 22.5% chance of spawning with a pumpkin or a 2.5% chance of spawning with a jack o'lantern equipped as headgear.

light level 12+ will prevent zombie pigmen from spawning.

Nether
Zombie pigman spawn in groups of 4 at the light level 11 or lower.

Nether Portals
When a nether portal block in the overworld receives a block tick, there is a small chance ($1/2000$ on easy, $2/2000$ on normal, and $3/2000$ on hard) it spawns a zombie pigman on the bottom part of the portal frame. If a zombie pigman spawned in this way does not leave the portal it spawns on, there is a possibility of teleporting to the nether.

Pigs
A zombie pigman spawns when lightning strikes within 4 blocks of a pig. If the player is riding the pig when lightning hits it, a zombie pigman appears on top of the player. Even if the pig is a baby, the zombie pigman still spawns as an adult.

Bedrock Edition
Zombie pigman appear near the overworld portal, not in it. Neither slabs nor lighting prevents this.

Nether
Zombie pigmen spawn in groups of 2-4 at light level 11 or lower.

Nether portals
They appear near the overworld portal, not in it. Neither slabs nor lighting prevents this.

Drops
Note: Information below is believed to apply to JE and BE.

When killed, zombie pigmen drop:
 * 0–1 . The maximum amount is increased by 1 per level of looting, for a maximum of 0-4 with looting III.
 * 0–1 s. The maximum amount is increased by 1 per level of looting, for a maximum of 0-4 with Looting III.
 * 2.5% chance to drop a if killed by a player or tamed wolf. The chance is increased by 1% per level of looting, for a maximum of 5.5% with looting III.
 * 8.5% chance to drop their if killed by a player or tamed wolf. The chance is increased by 1% per level of looting, for a maximum of 11.5% with looting III.
 * All items zombie pigmen have picked up after spawning are dropped upon death.
 * 5 (12 if baby) if killed by a player or tamed wolf. Deaths of hostile zombie pigmen always register as kills by the player they are targeting, regardless of whether that player ever touched that pigman.

Pumpkins and jack o'lanterns
If a zombie pigman wearing a pumpkin or jack o'lantern is killed using a tool enchanted with looting, there is a chance equivalent to the level of looting used to drop the pumpkin or jack o'lantern, up to a maximum of a 3% chance at looting III.

Behavior
Note: Information below is believed to apply to JE and BE.

Zombie pigmen tend to move relatively slowly. They cannot drown and are immune to both fire and lava damage. Baby zombie pigmen are faster than adult zombie pigmen. When provoked, their speed increases to the player's walking speed.

Like zombies and husks, zombie pigmen usually bang on wooden doors, and on hard, they can break them.

Some zombie pigmen have the ability to pick up items, including weapons they feel are better than their golden sword, which they drop with the same chance as if killed with looting I.

Zombie pigmen try to destroy any turtle eggs they see within 23 blocks away, not counting the block they are standing on.

Zombie pigmen are undead mobs, and are damaged by the status effect instant health and healed by the status effect instant damage. They are unaffected by the status effects regeneration and poison. They are ignored by the wither and affected by the smite enchantment.

Hostility
Zombie pigmen are not initially hostile, but all zombie pigmen within a 67×67×21 to 111×111×21 area centered on the attacked pigman become aggressive and converge on the player if any individual is attacked, unless the pigman attacked is killed in one hit. In addition, some zombie pigmen have the ability to spawn reinforcements when attacked (similar to zombies). This applies to any hit registered as coming from the player or other mobs, including deflected ghast fireballs, from sweep attacks, snowballs, or a skeleton arrow. This does not include fireworks shot from crossbows, or dispenser-shot arrows.

When provoked, their speed increases to the player's walking speed. Zombie pigmen remain hostile for a maximum of 20 Minutes, and continue to pursue an already-targeted player after this time until the player escapes their 40 block pursuit radius. Approaching within 35 blocks of an already hostile zombie pigman causes it to sound an alarm call, angering other zombie pigmen in a 40-block radius. The forgiveness timer does not advance for zombie pigmen in unloaded chunks. Therefore, if the player enters a nether portal and returns, any provoked zombie pigmen in the area remain aggressive unless another player was nearby to keep the chunks loaded. Dying does not cause zombie pigmen to become neutral toward the player even if a zombie pigman killed the player. They pursue a player even if the player has the invisibility status effect.

Hostility
Non-hostile zombie pigmen do not prevent a player from sleeping in a bed. (also in legacy console)

If a mob provokes a zombie pigman, they become aggressive toward that mob, and when the mob is killed they remain aggressive for seconds and attack any nearby player without provocation.

Sounds
Note: Information below is believed to apply to JE and BE.

Java Edition
Zombie pigmen have entity data associated with them that contain various properties of the mob.

Trivia

 * The pre-Texture Update zombie pigman skin file has "THX XAPHOBIA" written on the unused section as a credit by Notch to the skin's original creator, XaPhobia.
 * If a zombie pigman dies while aggressive, this is always considered a player kill, even if they are only aggressive because the player attacked a different zombie pigman. The player can use this to construct zombie pigman experience farms.
 * The zombie pigman is the only mob to have a "baby" variant that's texture is significantly different than its adult counterpart, with baby zombie pigmen missing the outer layer of their head and showing their skull. It instead appears inside of its head, which is a bug.
 * This is actually the same case with baby zombies and their variants, which is only visible via Texture Packs.
 * The zombie pigman's angry sound is played twice the speed of the original sound file in the game.
 * The golden swords that are dropped always have a durability of 26/33.