An x-ray is a bishop, rook or queen that attacks or defends a square through an enemy piece standing in its line. For now the line is blocked. As soon as that enemy piece moves, often because it had to recapture, the line opens and the hidden attack or defence counts. The puzzles on this page come from real games, are matched to your puzzle rating, and all use an x-ray.
Lines in chess are not only about what a piece attacks now, but what it would attack if one piece moved. A rook on c2 with an enemy rook on c6 does not attack c8 yet. But if the enemy rook leaves c6, perhaps to capture something on c8, the white rook suddenly covers c8.
That hidden reach changes how exchanges count. A square can look safe because it is defended once and attacked once, when in fact an x-ray adds a second attacker that only appears after the first capture.
White has a king on g1, a queen on f5 and a rook on c2, with pawns on f2, g2 and h2. Black has a king on g8, rooks on c8 and c6, and pawns on f7, g7 and h7. The rook on c8 looks well protected by the rook on c6, and White's rook on c2 does not see c8 at all, because the black rook on c6 blocks the file.
White plays 1.Qxc8+. It is check along the back rank, and Black's only legal move is 1...Rxc8, recapturing with the rook from c6. That recapture clears the c-file, and 2.Rxc8 is checkmate: the king is boxed in by its own pawns, and f8 and h8 are both on the rook's line. The white rook was defending c8 through the black rook all along.
An x-ray attack is what the example shows: a piece attacking through an enemy piece, so that when that piece moves or captures, the attack arrives. It often decides fights over a key square, such as the back rank or an open file. An x-ray defence is the same idea turned around: your piece protects a square through an enemy piece, so a capture there can be answered even though it looks undefended.
An x-ray is close to the skewer, where a piece in front is attacked and the one behind is lost, and to the pin. The difference is the order of events. In an x-ray the enemy piece in the middle is usually made to move by a capture or exchange, and only then does the line work.
The attacker misses x-rays by counting only the pieces that attack a square right now. The defender falls for them by recapturing with the piece that was blocking the line, as Black had to in the example. Before any exchange on a file, rank or diagonal, count every piece on that line, including the ones behind enemy pieces, and ask what each side sees after each capture.
Many x-ray puzzles start with a capture or a check that forces a recapture, and the point only appears one move later. Before you move, picture the line after the recapture and ask which of your pieces then sees the key square. If you are stuck, the hint shows the piece first, then the move. After you solve, the full line appears beside the board.
For mixed tactics at your level, use Puzzle Training. Puzzle Storm trains speed, the Woodpecker Method repeats a fixed set until it is automatic, and Elo Maxing serves the motif you are weakest at. Pattern Drill works from positions in your own games. Many x-rays finish as a back rank mate, and they sit next to skewers and pins. For training tactics motif by motif, read the Elo Maxing guide.
A bishop, rook or queen attacking or defending a square through an enemy piece on the same line. The attack or defence counts once that piece moves.
In a skewer the front piece is attacked and must move, exposing the piece behind. In an x-ray your piece acts through an enemy piece, usually after that piece is forced to move by a capture.
Bishops, rooks and queens, because an x-ray works along a line. Knights, pawns and kings cannot.
Before any exchange on a line, count every piece on it, including pieces behind enemy pieces, and picture the line after each capture.