Play chess online against the computer or a friend
Play a full game of chess online against the computer, right in your browser. Choose one of five levels, from a beginner opponent that makes human-looking mistakes to a searching engine that will punish loose pieces, or switch to two-player mode and play a friend on the same screen. There is nothing to install and no account to create.
Every rule of chess is implemented: castling on both sides, en passant, promotion to any piece, check, checkmate and stalemate, and the draw rules — threefold repetition, the 50-move rule and insufficient material. Move by dragging pieces or by tapping a piece and then one of the highlighted squares. Undo, hints, a flippable board, optional clocks, PGN export and import and FEN set-up are all included.
The computer opponent is a chess engine written for this page. It runs in a background Web Worker on your own device, so the board stays smooth while it thinks and no moves are sent anywhere.
How to use the Play Chess Online vs Computer
- Choose vs computer or Two players. Against the computer, pick your colour and a Level from 1 to 5; optionally pick a clock.
- Move a piece by dragging it to its new square, or tap it to see its legal moves as dots and rings, then tap the destination. With a keyboard, focus the board, move the cursor with the arrow keys and press Enter twice.
- When a pawn reaches the last rank, choose queen, rook, bishop or knight in the promotion box.
- Use Undo to take back your last move (and the computer’s reply), Hint to see a suggested move, and Flip to turn the board round.
- Open Import and export to copy or download the game as PGN, paste a PGN to replay it, or set up any position from a FEN string.
Play Chess Online vs Computer features
Five computer levels
Levels 1 and 2 search shallowly and add random noise to their choices, so they blunder like a beginner; level 3 plays solid club chess; levels 4 and 5 search deeper with more time.
Complete rules
Legal-move generation is verified with perft counts (8,902 positions after three moves from the start, 2,039 after two from the “Kiwipete” test position). All draw rules end the game automatically.
Drag, tap or keyboard
Pieces glide to their squares; the last move, the selected piece, legal targets and a king in check are highlighted. Keyboard players use the arrow keys and Enter.
Clocks
Optional 1, 3 + 2, 5, 10 and 15 + 10 minute clocks with increments. Running out of time loses, unless the opponent has only a king, which is a draw.
PGN and FEN
Export the game in standard PGN (with your colour, the level and the result), import PGN files with comments and variations, and start from any legal FEN position.
Original piece set
The pieces are a clean set drawn for this page as scalable graphics, readable on phones and large screens, in white and deep-violet.
How the computer opponent works
The engine uses alpha-beta search with iterative deepening: it looks one move ahead, then two, then three and so on until its time for the move runs out, always keeping the best move from the last completed depth. Good move ordering — the best move from the previous depth first, then captures sorted by “most valuable victim, least valuable attacker”, then killer moves and a history table — lets it skip most of the tree. A quiescence search keeps following captures at the end of each line so it does not stop counting in the middle of an exchange, and a transposition table remembers positions it has already searched.
Positions are scored by material (pawn 100, knight 320, bishop 330, rook 500, queen 900) plus piece-square tables that reward central knights, active bishops, rooks on the seventh rank, advanced pawns and a sheltered king, with the king encouraged to centralise once the queens and rooks come off. It is a compact engine, not a grandmaster: expect level 5 to beat most casual players but lose to strong club players.
Levels at a glance
| Level | Search | Thinking time | Style |
|---|---|---|---|
| 1 · Beginner | 1 move ahead | instant | Large random noise: misses tactics often |
| 2 · Casual | 2 moves ahead | under ½ s | Some noise; spots simple captures |
| 3 · Club | 3 moves ahead | up to 1 s | Rarely hangs pieces |
| 4 · Strong | up to 5 moves | up to 1.5 s | Sees short combinations |
| 5 · Strongest | as deep as time allows | up to 2.6 s | Deepest search; plays the endgame actively |
Draw rules applied automatically
Like this? Try tic tac toe against an unbeatable computer, a game of Klondike solitaire, or a sudoku puzzle.
- Stalemate: the side to move has no legal move but is not in check.
- Threefold repetition: the same position with the same side to move, castling rights and en passant possibilities occurs three times.
- 50-move rule: 50 moves by each side without a pawn move or capture. In tournament play this must be claimed; here the game ends automatically.
- Insufficient material: king against king, king and one minor piece against king, or kings with bishops all on the same colour of square.
Play Chess Online vs Computer FAQ
Can I play chess online against the computer for free?
Yes. This page is free, with no sign-up, download or in-game purchases. The engine runs on your own device.
How strong is the computer?
Level 1 is for complete beginners and makes frequent mistakes. Level 3 is a solid casual opponent. Level 5 searches as deep as it can in about two and a half seconds and is a real challenge for most club players, but it is not a world-class engine.
Can two people play on one device?
Yes. Choose Two players and take turns moving. Flip turns the board round if you are sitting opposite each other.
How do I castle or capture en passant?
Move the king two squares towards the rook to castle; the rook jumps over automatically. For en passant, move your pawn diagonally behind the enemy pawn that just advanced two squares — it is shown as a legal target.
How do I save or share a game?
Open Import and export and press Copy PGN or Download .pgn. PGN files open in almost every chess program and website.
Why did my game end in a draw?
The status line tells you which rule applied: stalemate, threefold repetition, the 50-move rule or insufficient material. With clocks on, a player who runs out of time loses unless the opponent has only a king.