White captures en passant
- Input
- 4k3/8/8/3pP3/8/8/8/4K3 w - d6
- Expected output
- exd6
The black pawn has just moved d7 to d5. The white pawn on e5 goes to d6 and removes the d5 pawn.
How to Play Chess: Interactive Lessons
en passant chess rule
"En passant" is French for "in passing": a special pawn capture that often surprises learners. The rule exists so that a pawn's two-square advance cannot slip past a capture that would have been possible had it moved one square at a time.
The black pawn has just moved d7 to d5. The white pawn on e5 goes to d6 and removes the d5 pawn.
The white pawn has just moved d2 to d4, beside the black pawn on e4. The black pawn captures diagonally on d3.
The same position, but without the en passant square in the FEN: the d5 pawn was already there. Without a two-square advance on the previous move, there is no capture.
Start with the board and how each piece moves, then learn the rules that decide the game: check, checkmate and stalemate. Only then come the special moves (castling, en passant and promotion) and opening principles. This path follows exactly that order, with exercises after each explanation.
No. Like any capture in chess, it is an option. If you do not want to capture, play another move, but you will lose the chance on the following move.
When the two-square advance was introduced, a pawn could cross a square attacked by an enemy pawn without being capturable. En passant keeps the balance by treating the crossing as if it were a one-square advance.
Only with a pawn that stands on the 5th rank (White) or 4th rank (Black), beside the pawn that just advanced two squares. Pawns on other ranks, or any other piece, cannot.
Your rank: Pawn
0 of 21 lessons completed · 0 of 92 exercises
Lesson 16
A special pawn capture that is only available on the next move.
"En passant" means "in passing" in French. When a pawn advances two squares and lands beside an enemy pawn, that pawn may capture it as if it had moved only one square. The capture is diagonal, to the square the pawn passed over.
It can only be done on the very next move: if you do not capture right away, the right is lost. And it only works when the enemy pawn has just moved two squares and stopped beside yours, which must be on its 5th rank (White) or 4th rank (Black).
The black pawn has just moved d7 to d5. Capture it en passant.
You are playing White.
Use the arrow keys to move between squares. Enter or space selects a piece, then the destination square. Escape cancels.