The Spider (minecraft:spider) is an Overworld mob that climbs walls and attacks at close range. It seeks out players in darkness and can retaliate when struck in a bright area. The smaller Cave Spider is a separate mob that can inflict Poison with its bite.
Spiders can spawn naturally in dark places on the surface and underground on Easy, Normal, and Hard. In Java, the Overworld monster-spawn rules require block light 0 and also check ambient light. In Bedrock, the spider spawn rule uses a weather-adjusted brightness range of 0–7 in eligible biomes. These checks govern where a spider appears.
In both editions, a Trial Chamber can select the Spider for its melee Trial Spawners. The Cave Spider belongs to the separate small melee group.
A spider can climb a vertical wall when it reaches it, and it can leap during a close-range attack. Bright conditions suppress ordinary targeting of a nearby player. A player who strikes a spider can still draw a counterattack. If a spider has already acquired a target, stepping into light may leave the attack in progress. In Java the active attack goal can drop the target in bright conditions. In Bedrock, the switch to neutral targeting and the end of the active angry state are separate events.
Java Edition. A spider can spawn with a Skeleton rider, forming a spider jockey. On Hard difficulty, spiders can spawn with a permanent effect such as Speed, Strength, Regeneration, or Invisibility.
Bedrock Edition. The spider has 16 health points and a collision box 1.4 blocks wide by 0.9 blocks high. Bedrock also has spider jockeys. Its vanilla behavior data includes Skeleton and Stray riders, and the Mounts of Mayhem release added a chance for a Parched to ride a spider in deserts in place of a regular Skeleton.