Chess960 generator
Chess960: generate any of the 960 starting positions
Free · runs in your browser
A new Chess960 start in one click
- Random position or any number from 0 to 959
- The back rank spelled out, ready to set up on a real board
- X-FEN and Shredder-FEN to copy, and a link to share the position
What is Chess960?
Chess960, also called Fischer Random Chess, is chess with a shuffled back rank. Bobby Fischer introduced it in 1996 to take memorised opening theory out of the game: when the pieces start somewhere new, both players have to think from the first move.
Everything else is ordinary chess. The pieces move as usual, the pawns start on the second and seventh ranks, and checkmate, stalemate and the draw rules are unchanged. Only the starting squares of the pieces behind the pawns differ, and castling is adjusted so it still works from any start.
The setup rules
- White's eight pieces are placed on the first rank in any order that keeps the rules below.
- The two bishops stand on squares of opposite colours.
- The king stands somewhere between the two rooks, so castling is possible on both sides.
- Black's pieces mirror White's exactly on the eighth rank.
Those rules allow exactly 960 arrangements, which is where the name comes from.
Castling in Chess960
After castling, the king and rook stand where they would in a normal game. Castling towards the h-file puts the king on g1 and the rook on f1; castling towards the a-file puts the king on c1 and the rook on d1. Black castles to g8 and f8 or c8 and d8.
The usual conditions apply: neither the king nor that rook has moved, the king is not in check, and it does not pass through or land on an attacked square. In addition, every square the king or the rook crosses or lands on must be empty, apart from the king and rook themselves.
Because the pieces can start anywhere, castling sometimes moves only one of them. If the king already starts on g1 with the rook on h1, castling on that side moves just the rook to f1.
How the position numbers work
The standard numbering scheme, devised by Reinhard Scharnagl, gives every start a number from 0 to 959. A number is decoded one piece at a time:
- Divide by 4. The remainder places the light-squared bishop on b, d, f or h.
- Divide the result by 4. The remainder places the dark-squared bishop on a, c, e or g.
- Divide by 6. The remainder places the queen on the first, second, … sixth empty square from the a-file.
- The result, 0 to 9, picks one of the ten ways to put the two knights on the five squares left.
- The last three squares take a rook, the king and a rook, in that order.
Position 518 works out to RNBQKBNR, the normal setup: 518 = 2 + 4 × 1 + 16 × 2 + 96 × 5, which puts the light-squared bishop on f1, the dark-squared bishop on c1, the queen on d1 and the knights on b1 and g1, leaving a1, e1 and h1 for rook, king and rook.
Some positions by number
| Number | White's back rank (a to h) |
|---|---|
| 0 | BBQNNRKR |
| 1 | BQNBNRKR |
| 518 | RNBQKBNRstandard chess |
| 706 | BRKQNBNR |
| 959 | RKRNNQBB |
K king, Q queen, R rook, B bishop, N knight. Black uses the same order on the eighth rank.