X-Ray Attack in Chess: What It Means and How to Use It
X-Ray AttackAn X-ray attack is when a piece attacks or defends through an enemy piece along the same line, as if seeing through it.
What “x-ray attack” means in chess
An x-ray attack occurs when a rook, bishop, or queen lines up against a target with an enemy piece sitting in between on the same rank, file, or diagonal. The attacking piece is not blocked in the tactical sense, it is still exerting influence through the blocker, ready to act the moment that piece moves or is captured.
X-rays are commonly used for defense as well as attack: a rook can x-ray-defend a piece behind another rook, so if the front rook is captured, the recapture is already lined up. On the attacking side, x-rays set up combinations where removing the blocking piece reveals a bigger threat.
The related idea of x-ray defense means two same-color pieces stacked on a file both defend the point at the end of it, even though only the front piece looks active. Recognizing x-rays helps you evaluate whether a trade on a contested square is actually safe.
How it plays out in practice
- Check every open file and diagonal for a second friendly or enemy piece stacked behind the first one, that back piece is x-raying through.
- Before trading on a square, verify whether an x-ray defender behind your opponent's piece will simply recapture.
- Use x-ray attacks to justify sacrifices: if removing the blocker exposes a queen or king behind it, the sacrifice may win material.
- Stack rooks or queen-and-rook batteries deliberately on open files to create x-ray pressure on the back rank.
Common mistakes
- Capturing a piece without noticing a queen or rook x-raying through it, walking into an unfavorable recapture.
- Overlooking your own x-ray defenders and assuming a piece is undefended when it is actually backed up through the line.
- Confusing x-ray attacks with pins, a pin restricts the pinned piece, while an x-ray is about the attacker seeing through it.
Does this concept show up in your games?
Definitions are the easy part, the hard part is knowing whether x-ray attack situations are winning or losing you games. Chess DNA analyzes your real Chess.com and Lichess games with Stockfish and shows the exact patterns, tactical motifs, structures, endgame situations, where you gain or lose rating, with targeted drills for the ones you keep getting wrong. Free to try on your recent games.
Frequently Asked Questions
What is an x-ray attack in chess?
An x-ray attack is when a long-range piece, rook, bishop, or queen, attacks or defends a square or piece through another piece standing in the way on the same line. The blocking piece does not fully stop the influence; the attacker is effectively "seeing through" it, ready to capture or recapture the instant the blocker leaves or is taken. It is a key idea for evaluating trades on contested files and diagonals.
How is an x-ray different from a pin?
A pin immobilizes the piece in front because moving it would expose something more valuable behind it, from the attacker's perspective on the far side. An x-ray is about the attacker's own line of influence passing through a piece to reach a target or support a recapture. The two often appear together, but a pin restricts the pinned piece's movement while an x-ray describes what the attacker can still do through it.
Can knights or pawns make x-ray attacks?
No. X-ray attacks only work with pieces that move along continuous lines, rooks, bishops, and queens, because the concept depends on influence traveling through a square occupied by another piece. Knights jump directly to a square and have no line to see through, and pawns only attack one square diagonally, so neither can x-ray.
Free chess tools, no signup
Every tool below runs Stockfish in your browser and is free to use.