Skip to content

    PGN Validator & Cleaner

    Free tool · No account needed

    Illegal: 21. Nf6Position where it stopped

    Illegal move at 21. Nf6

    40 moves were legal before this one. The moves that are legal in that position are listed below.

    Did you mean ?

    Moves after the error, not checked: 1

    Tokens read
    42
    Moves played
    40
    Result
    *
    Legal moves here (44)

    Pick one to put it in place of Nf6 and check again.

    Notation fixed automatically

    2 tokens were rewritten to standard SAN.

    • 5. 0-0 → O-O
    • 8... 0-0 → O-O

    Moves before the error

    Everything from the illegal move on is left out, and the result is set to “*”. Fix that move to keep the whole game.

    [Event "Club championship"]
    [Site "?"]
    [Date "????.??.??"]
    [Round "?"]
    [White "Player A"]
    [Black "Player B"]
    [Result "*"]
    
    1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3
    O-O 9. h3 Nb8 10. d4 Nbd7 11. Nbd2 Bb7 12. Bc2 Re8 13. Nf1 Bf8 14. Ng3 g6 15. a4
    c5 16. d5 c4 17. Bg5 h6 18. Be3 Nc5 19. Qd2 h5 20. Bg5 Be7 *
    

    Runs in your browser. Nothing is uploaded.

    Paste a PGN or a bare list of moves. The validator plays them out on a real board, points at the first move that does not work and lists the legal alternatives, then rewrites the game as a clean seven-tag PGN. Shorthand such as 0-0, dc or e8Q is normalized automatically. For what each header tag means, see what is PGN.

    How to validate a PGN

    1. 1.

      Paste the PGN, or just the moves, into the box.

    2. 2.

      Click Validate. Green means every move is legal; red points at the first problem.

    3. 3.

      Fix the move in your source (or in the PGN viewer) and validate again.

    4. 4.

      Copy or download the cleaned PGN.

    What this tool does

    Exact error location

    See the move number, the token that failed, and every legal move in that position.

    Notation clean-up

    Castling with zeros, missing check marks, lowercase pieces and promotion shorthand are corrected to standard SAN.

    Standard output

    The result is a Seven Tag Roster PGN wrapped at 80 columns that Chess.com, Lichess and ChessBase accept.

    Nothing leaves your browser

    Validation runs locally with chess.js. Paste tournament games without worrying about privacy.

    Frequently asked questions

    What does the validator check?

    It parses the header tags, strips comments and variations, then plays each move on a board that enforces the rules of chess. Any move that is illegal, ambiguous or malformed is reported with its move number and the legal moves in that position.

    Can I paste moves without headers?

    Yes. A bare move list such as "1. e4 e5 2. Nf3 Nc6" is enough. The cleaned output adds placeholder headers you can fill in.

    Does it fix errors automatically?

    It fixes notation errors — 0-0 for O-O, dc for dxc5, e8Q for e8=Q, missing + and # signs. It cannot guess what a genuinely illegal move was meant to be; that is why it shows the legal alternatives for you to choose from.

    Why do handwritten scoresheets produce invalid PGN?

    Players skip a move, write the wrong file, or forget to mark a capture. If you are typing up a scoresheet, ScanChess can read the photo, apply the same validation and let you correct moves on the board.

    Is the game on a paper scoresheet? Scan it into PGN instead of typing it.

    All tools

    Typing up scoresheets by hand?

    Skip the typing. ScanChess reads handwritten scoresheets, validates every move the same way and lets you fix mistakes on the board. Free credits on sign-up.

    Scan a scoresheet