Image to FEN: understand FEN and get it from a picture
For iPhone, iPad, Mac and Android. No account.
FEN viewer
Valid position
| Piece placement | r1bqkb1r/pppp1ppp/2n2n2/4p2Q/2B1P3/8/PPPP1PPP/RNB1K1NR |
|---|---|
| Side to move | White |
| Castling rights | KQkq |
| En passant | none |
| Halfmove clock | 4 |
| Move number | 4 |
Turning a photo or screenshot into a FEN works in the ChessWOW app, directly on your device.
FEN is the single line of text that describes a chess position. Paste one into the viewer above to see the board, check that the position is valid and copy it on. This guide explains every part of a FEN, how a picture of a board becomes a FEN, which details no picture can contain, and how to get a FEN from a photo, a screenshot or a book diagram with the ChessWOW app.
What FEN is
FEN stands for Forsyth-Edwards Notation. It is based on a system by the Scottish journalist David Forsyth from the 19th century and was extended by Steven J. Edwards for use in chess software. Almost every chess program, website and engine can read and write it. A FEN has six fields, separated by spaces. This is the starting position:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1| Field | Example | Meaning |
|---|---|---|
| 1. Piece placement | rnbqkbnr/.../RNBQKBNR | Where every piece stands, rank 8 first |
| 2. Side to move | w | w for White, b for Black |
| 3. Castling rights | KQkq | Which castling moves are still allowed, a hyphen if none |
| 4. En passant square | - | The square a pawn just skipped, or a hyphen |
| 5. Halfmove clock | 0 | Moves since the last capture or pawn move (fifty-move rule) |
| 6. Move number | 1 | Starts at 1 and goes up after each Black move |
The letters are always English, whatever language your chess app uses: K king, Q queen, R rook, B bishop, N knight, P pawn. Capital letters are White pieces, small letters are Black pieces. In castling rights, K and Q stand for White's kingside and queenside castling, k and q for Black's.
How to read a FEN
The first field describes the board rank by rank, from rank 8 (Black's side) down to rank 1 (White's side). Within each rank, you read from the a-file to the h-file. A letter is a piece, a digit is a number of empty squares in a row, and a slash ends the rank. After 1.e4 c5 2.Nf3 the FEN is:
rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2rnbqkbnr: rank 8, all black pieces still at home.pp1ppppp: rank 7, black pawns on a7 and b7, c7 empty, pawns on d7 to h7.8: rank 6 is empty.2p5: rank 5, two empty squares, a black pawn on c5, five empty squares.4P3: rank 4, a white pawn on e4.5N2: rank 3, a white knight on f3.PPPP1PPPandRNBQKB1R: ranks 2 and 1, e2 and g1 are empty.b KQkq - 1 2: Black to move, all four castling rights, no en passant square, one halfmove since the last pawn move (2.Nf3), move 2.
A quick check for any FEN: every rank must add up to exactly eight squares, and there must be exactly eight ranks.
What a picture cannot know
A picture shows only the first field: where the pieces stand. The other five fields describe the history of the game, and an image does not contain it. That matters, because the same picture can be a win for one side or the other:
- Side to move. You have to set it. Most diagrams in books say it in the caption, for example "White to play".
- Castling rights. A king and rook on their starting squares may or may not have moved earlier. Only enable castling if you know they have not.
- En passant. If the last move was a pawn advancing two squares, the square it skipped goes into field 4. In
rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3(after 1.e4 e6 2.e5 d5) White can capture exd6 en passant. The original standard writes this square after every two-square pawn move; many programs write it only when a capture is actually possible. Both forms load in most software. - Halfmove clock and move number. They only matter for the fifty-move rule and for display. If you do not know them,
0 1is the usual choice.
How image to FEN works
Turning a picture into a FEN is a pattern recognition task. Recognition tools generally work in these steps:
- Find the board. The four corners of the board are located in the image. In a photo the board is often tilted or seen at an angle, so the image is straightened to a square.
- Divide it into squares. The square board is cut into an 8 by 8 grid of 64 squares.
- Recognize each square. For every square, the tool decides between 13 options: empty, or one of the six piece types in white or black.
- Decide the orientation. The tool works out which side is at the bottom. Coordinates printed at the edge of the board help; without them, a board seen from Black's side can come out mirrored.
- Build the FEN. The 64 results become the piece placement field. The side to move, castling rights and en passant square come from you.
Errors usually come from step 3. Small images make bishops and pawns look alike, unusual piece designs or colors confuse the recognition, and arrows or highlighted squares drawn on top can hide a piece. That is why a good tool tells you which squares it is unsure about, and why you should always compare the result with the original.
Tips for a good image
- Show all 64 squares. Do not crop into the board. Cropping away browser bars or chat bubbles around it is fine.
- Use a screenshot when you can. A screenshot of a 2D board is straight and sharp. A photo of a screen adds reflections and moiré patterns.
- Photograph books from straight above. Hold the camera parallel to the page, avoid shadows from your hand and make sure the page lies flat.
- Remove overlays. Arrows, colored squares and last-move highlights can hide pieces. If possible, take the picture without them.
- Larger is better. Open a thumbnail full size before you take a screenshot of it. More pixels per square mean fewer mix-ups.
- Note whose move it is. Write it down or check the caption, because you will need to set it.
Check a FEN: typical mistakes
Paste a FEN into the viewer above and it checks the position. These are the mistakes that come up most often, in hand-typed FENs and in recognized ones:
- A rank does not add up to eight.
pp1pppphas only seven squares. Count letters plus digits for each rank. - The board is upside down. The FEN starts with rank 1 instead of rank 8. Typical sign: White pawns on rank 7 in an opening position.
- Colors swapped. Capital and small letters mixed up, so White and Black trade places.
- Kings. Each side needs exactly one king, and the side that is not to move must not be in check.
- Pawns on the edge ranks. A pawn on rank 1 or 8 is impossible; it would have promoted.
- Castling rights that cannot exist.
Krequires a white king on e1 and a white rook on h1. If one of them stands elsewhere, the right must go. - Wrong en passant square. With White to move it must be on rank 6, with Black to move on rank 3, directly behind a pawn that just moved two squares.
- Too many pieces. More than eight pawns per side, or more pieces than promotions allow, means a square was misread.
From a photo to a FEN in the ChessWOW app
The viewer on this page works with text. To turn an image into a FEN, use the ChessWOW app on iPhone, iPad, Mac or Android:
- Step 1
Choose the image. Tap "Scan position" and take a photo, pick a screenshot from your library, paste a copied image or photograph a diagram in a book.
- Step 2
Check the corners. The app finds the board. If a corner is off, drag the corner marker into place. Rotate the photo in steps of 90 degrees or flip the board if needed.
- Step 3
Correct the board. Squares the recognition is unsure about are marked. Tap a square to change or remove a piece.
- Step 4
Set the details. Choose whose move it is and confirm castling rights and en passant only when you know they apply.
- Step 5
Use the position. Analyze it with Stockfish 19, play it out, or copy it as FEN to paste anywhere.
More on specific sources: analyze a chess screenshot and scan a chess book diagram. If you have no picture at all, set the position up square by square in the board editor, which also runs in your browser and gives you the FEN at the end.
Questions and answers
What does FEN stand for?
Forsyth-Edwards Notation. It describes one chess position in a single line of text with six fields.
Can I convert a picture to FEN on this page?
No. The viewer on this page reads and checks FEN text. Image recognition is part of the ChessWOW app for iPhone, iPad, Mac and Android.
Why do I have to set the side to move after a scan?
A picture does not show whose move it is, and the best move depends on it. The same applies to castling rights and en passant.
What is the difference between FEN and PGN?
FEN describes one position. PGN describes a whole game, move by move, with information such as players and result.
What do the two numbers at the end of a FEN mean?
The first counts halfmoves since the last capture or pawn move, for the fifty-move rule. The second is the move number. If you do not know them, use 0 1.
Why is my FEN invalid?
Most often a rank does not add up to eight squares, a king is missing, or castling rights are set for a king or rook that is not on its starting square.
Continue with
Turn the next diagram into a FEN.
Scan photos, screenshots and book diagrams with ChessWOW on iPhone, iPad, Mac and Android.