Play Chess Against the Computer

Play chess against the computer whenever you like: choose your colour and level and play against a chess engine that runs right in your browser. Your game survives a page reload.

Source: FIDE Laws of Chess (effective 1 Jan 2023): piece movement, checkmate, stalemate, draw rules. Updated: .

Have fun! Tap a piece, then its target square.

    Position and notation (FEN / PGN)

    FEN describes a single position, PGN a whole game. Loaded positions and games do not count towards your statistics.

    Wins
    0
    Draws
    0
    Losses
    0

    Keyboard: Tab jumps to the board, arrow keys pick a square, Enter or Space selects a piece or moves it, Esc clears the selection.

    Your current game, settings and statistics are stored only in this browser (localStorage).

    Engine: Stockfish 19 lite (GPL-3.0), running as a separate program in a worker in your browser. Licence and source code

    My Toolbox

    Result

    How it is calculated

    Play chess against the computer

    Here you play against a chess engine that runs entirely in your browser – no account, no waiting for an opponent. Choose White, Black or random, and one of eight levels.

    How it works

    1. Tap a piece: its legal target squares are marked (dot = move, ring = capture).
    2. Tap the target square – the computer answers after a short think.
    3. “Take back” undoes your last move and the reply, “Hint” shows a good move, “Flip board” switches the view.

    The eight levels

    LevelThinking timeSearch depthFor whom?
    1–2up to 0.1 s1–2 pliesbeginners, children
    3–4up to 0.25 s3–5 pliescasual players
    5–6up to 0.6 s8–12 pliesclub players
    7–8up to 1.5 s16 or unlimitedvery strong players

    The level sets the engine’s “Skill Level” option (0 to 20), the thinking time and the search depth. On the lower levels the computer deliberately makes mistakes. We deliberately do not quote an Elo rating – strength also depends on your device.

    Rules at a glance

    The technology

    The rules (legal moves, check, mate) are checked by the page’s own code, tested against the standard perft values of the Chess Programming Wiki (e.g. 8,902 positions after three plies from the starting position). The computer’s moves come from Stockfish, one of the strongest free chess engines, in its small “lite” build (approx. 1.8 MB). It runs as a separate program in a Web Worker and only exchanges text commands with the page. Stockfish is licensed under the GNU GPL v3; the licence and complete source code are hosted on this website.

    Privacy

    Your game, settings and statistics (wins, draws, losses) live only in your browser’s localStorage. The engine is loaded from this website with the computer’s first move; nothing is sent to a server.

    Related: Chess clock for games on a real board, and Sudoku.

    Share a position, FEN and PGN

    “Share position” creates a link to the current position. Whoever opens it gets the puzzle “find the best move” and, after moving, sees what the engine would have played on its highest level – then the game continues against the computer. Under “Position and notation” you find the position as FEN and the game as PGN: copy either one, or save the game as a .pgn file. You can also paste a FEN or a PGN game and play on from there; every move is checked against the rules. On a computer you can drag pieces with the mouse, on a phone you tap the piece and then the target square.

    Frequently asked questions

    Can I play chess against the computer free without signing up?

    Yes. The engine runs in your browser, with no account and no download. Your game survives a page reload.

    How strong is the computer?

    You decide: level 1 makes many mistakes and suits beginners, level 8 plays very strongly. In between, thinking time, search depth and accuracy increase step by step.

    Which level is easy for beginners?

    Start with level 1 or 2. Once you win there regularly, go up a level. “Hint” shows you a good move at any time.

    Can I take back a move?

    Yes, with “Take back” – the computer’s reply is taken back too, so it is your move again.

    When is a game drawn?

    By stalemate, when the same position occurs three times, after 50 moves by each side without a pawn move or capture, and when neither side can mate any more, such as king versus king.

    Which engine is behind it?

    Stockfish 19 in its small “lite” build, a free engine under the GNU GPL v3. It runs separately from the rest of the page; licence and source code are linked below the board.

    Sources and legal basis

    As of: · Editorial policy

    Related tools