FEN viewer: paste a FEN, see the board

Any chess position as text, drawn as a board in your browser. Check it, copy it, play it.

Try:
FEN
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Analyze in Lichess or Chess.com

A board on its own works too: the side to move, castling rights and counters are filled in.

What is FEN in chess?

FEN, Forsyth–Edwards Notation, is the one-line text format every chess program uses to describe a position. It has six fields, separated by spaces: the pieces rank by rank, the side to move, the castling rights, the en passant square, the halfmove clock and the move number. The starting position reads:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Only the first field is the board. The other five say whose move it is and what is still allowed; a viewer like this one can fill them in when they are missing.

How to read a FEN string

Read the first field from the top of the board down: each run between the slashes is one rank, starting with rank 8 as White sees it. Capital letters are White’s pieces and small letters Black’s, in the English initials: K for king, Q for queen, R for rook, B for bishop, N for knight, P for pawn. A digit counts empty squares in a row, so 8 is an empty rank and 4P3 is four empty squares, a white pawn, three more.

After the board, w or b says who moves next. The castling field lists the rights still available, K and Q for White’s king side and queen side, k and q for Black’s, or - for none. The en passant field names the square behind a pawn that just moved two steps, or -. The last two numbers count half-moves since the last capture or pawn move, for the fifty-move rule, and the full move number. After 1.e4, the starting position becomes:

rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1

How to get the FEN of a position from a photo

Photograph the board and let the chess board scanner write the FEN for you. It reads a real set from a normal phone photo, at an angle from where you sit, as well as diagrams and screens, and the position opens in a board editor so any square can be fixed before you copy it. The first scan needs no account.

From a site, use its export: Lichess shows the FEN under the analysis board, and Chess.com under Share on the analysis page. Paste it here to check it and take it on.

FEN to board, and then on to a game

Paste the FEN above and the board is drawn at once. From there, copy the normalised FEN, open the position in the Lichess or Chess.com analysis board, or play it: in the Snap That Piece web app the same position becomes a game against Stockfish or Leela Chess Zero, or a live game with a friend over a share link.

No position to hand? Start from a Chess960 starting position or one of the GM Equal Positions.

Questions

Something else? Email support.

What does FEN stand for?

Forsyth–Edwards Notation, after David Forsyth, who devised the board shorthand in the 1880s, and Steven Edwards, who extended it for computer chess. It describes one position in a single line of text: the pieces rank by rank, the side to move, the castling rights, an en passant square, and two move counters.

Why does a site say my FEN is invalid?

Usually one rank doesn't add up to eight squares, a king is missing, or a pawn stands on the first or last rank. Paste the FEN here and the viewer names the rank or field that is wrong. A board on its own, without the five fields after it, is fine: they are filled in.

Can I play a FEN position against a bot?

Yes. Open the position in the Snap That Piece web app and play it out against Stockfish, or against Leela Chess Zero with the Maia networks from 1100 to 2200 Elo, or send a friend a challenge link. A free account is needed to play; viewing and copying a FEN here is not.

Does a FEN include the moves of the game?

No. A FEN is a snapshot of one position; the moves that led to it are not in it. A whole game is written as PGN, which can start from a FEN. Lichess and Chess.com both accept a FEN to set up a position and a PGN to replay a game.

Got a board in front of you?

Photograph it and the FEN comes back in seconds.