Games & scoring / Board and puzzle games
Four in a Row: Play in Your Browser
Drop discs into a seven-column grid and make a line of four against a friend or the computer.
Four in a Row: Play in Your Browser: Discs fall to the lowest open square in a 7 × 6 grid. Four matching discs in a horizontal, vertical or diagonal line win, and the winning line is highlighted. Runs 100% locally in your browser with zero server file uploads.
- Category
- Health & sport tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
Best computer wins: 0
Choose any square in a column to drop a disc. Make a line of four horizontally, vertically or diagonally. Click, tap or Enter to play; arrows move focus.
Four-disc rules
The grid is seven columns by six rows; a disc falls within its chosen column. A line of four wins in any straight direction. Publisher rules for the familiar commercial version: https://instructions.hasbro.com/en-us/instruction/connect-4-game
Search strategy
Medium and hard use negamax with alpha-beta pruning and a transposition table, favouring central columns and open lines. Original browser implementation; no external game engine or artwork is used.
How to use it
- Choose the game options and restart when you want a fresh game.
- Play with a mouse, touch or the keyboard using the controls below.
- Read the result, or pause and resume the game.
Privacy & limitations
The game runs in your browser. No game state or chosen image is uploaded. Best results are stored locally on this device.
Related tools
Frequently asked questions
Can I play on the same device with a friend?
Yes. Choose A friend and take turns dropping discs. Player 1 starts. A full board without a line is a draw.
How do the computer levels differ?
Easy chooses a random legal column. Medium and hard check immediate wins and threats, then search 4 and 7 turns ahead. Hard uses a deeper search but is not a perfect solver.
Free tool · runs in your browser · no account required