Skip to content

    FEN Validator

    Free tool · No account needed

    Paste a FEN to see whether it is legal, and how to fix it if it is not. Runs in your browser. Nothing is uploaded.

    Have a screenshot or photo of this position? Scan it and the board sets itself up.

    A FEN describes one chess position in a single line: where the pieces stand, whose move it is, the castling rights, the en passant square and two move counters. One wrong character is enough for a chess program to refuse it, usually with a message like “invalid FEN” and nothing more. This page checks every part of the string and lists each problem in plain words, with what to change. A FEN that passes shows its board, the side to move, and whether that side is in check, checkmated or stalemated.

    What this tool does

    Every problem, not just the first

    Ranks that do not add up to eight squares, stray characters, a missing king, nine pawns, castling rights the pieces do not allow, a wrong en passant square, bad move counters: all are listed at once, each with its own fix.

    Checks the rules, not only the syntax

    A FEN can be well formed and still impossible: the side that has just moved left in check, a pawn on the back rank, more queens than promotions could explain. These are caught too.

    A corrected FEN when the fix is certain

    If only the castling, en passant or counter fields are wrong, the page offers the FEN with those fields fixed. A wrong king count or piece placement is left for you to decide.

    Checked on your device

    The FEN is checked in the page. Nothing is uploaded, and you do not need an account.

    How to check a FEN

    1. 1

      Paste the FEN into the box, or open this page from a link that ends in ?fen= and the FEN.

    2. 2

      Press Check FEN. A green result means the position is legal; a red one lists each problem.

    3. 3

      Apply the fix shown under each problem, or use the corrected FEN when one is offered.

    4. 4

      Once it is valid, copy the full FEN or open it in the board editor, FEN to Image or FEN to PGN.

    Frequently asked questions

    What makes a FEN valid?
    Six fields separated by spaces: the piece placement (eight ranks from the eighth to the first, separated by slashes), the side to move (w or b), the castling rights (for example KQkq, or -), the en passant square (for example e3, or -), the halfmove clock and the move number. The position must also be possible: one king each, no pawn on the first or eighth rank, and the side that has just moved not in check.
    Why are my castling rights reported as wrong?
    A castling letter is only possible while that king and rook stand on their starting squares: K needs the white king on e1 and a rook on h1, Q needs e1 and a1, k needs the black king on e8 and a rook on h8, q needs e8 and a8. Remove the letter for any pair that has moved.
    Which en passant square should a FEN have?
    The square a pawn skipped over on the last move, and only right after a two-square pawn move: on the sixth rank with White to move, on the third with Black to move. Otherwise write -. Some programs write it only when an en passant capture is actually possible; both forms are valid.
    Is a FEN with only the placement and side to move valid?
    Many programs accept it and assume no castling rights, no en passant square and move 1. The validator accepts it too, with a warning, and shows the full six-field FEN.
    Can a valid FEN still be a position no game could reach?
    Yes. The validator checks the rules every position must obey, not whether a real game could have led to it. A few positions pass every check and still could not arise from the starting position.

    The position is in a screenshot or a book diagram

    Scan the image and ScanChess sets up the board and writes the FEN for you to check. Free credits on sign-up.

    Scan a board image

    More free tools

    All tools