Home › Fun & Games › Connect Four

Connect Four

Drop your red discs and get four in a row before the computer does. Choose Easy, Medium or Hard, or pass the device and play a friend.

Last updated:

You (Red)0
Draws0
Computer (Yellow)0

Your move

Keys: 1–7 drop a disc, ← → + Enter choose a column, U undo, N new game. Scores are kept per difficulty and saved on this device.

Advertisement
Advertisement

How to use the Connect Four

  1. Pick a mode. Play vs Computer and choose Easy, Medium or Hard, or switch to 2 players.
  2. Choose who starts. Red (you), Yellow (computer) or alternate between games.
  3. Drop a disc by clicking or tapping a column. A faint disc above the board shows where you are aiming.
  4. Connect four of your discs in a row, column or diagonal to win. The winning line lights up.
  5. Use Undo move to take back a mistake, and press Start new game (or N) for the next round.

Connect Four rules at a glance

Connect Four is played on an upright grid of 7 columns and 6 rows (42 spaces). Players take turns dropping one disc into a column; the disc falls to the lowest empty space. Each player starts with 21 discs. The first player to make a line of four of their own discs, in any of the four directions, wins.

DirectionExampleHow it is often missed
HorizontalFour discs side by side in one rowAn open three on the bottom row (empty on both ends) cannot be blocked twice
VerticalFour discs stacked in one columnEasiest to spot; rarely decides a game between experienced players
Diagonal (rising)Bottom-left to top-rightBuilds slowly as columns fill and is the most common surprise win
Diagonal (falling)Top-left to bottom-rightSame as above, mirrored

There are 69 possible lines of four on the board: 24 horizontal, 21 vertical and 24 diagonal. A disc in the middle of the center column takes part in 13 of them, while a corner disc takes part in only 3, which is why central control matters so much.

Strategy tips that actually work

  • Start in the middle. Connect Four was solved in 1988 by James D. Allen and, independently, Victor Allis: the first player wins with perfect play if they open in the center column. Opening on the edge columns lets a perfect opponent win.
  • Make two threats at once. A single three-in-a-row is easy to block. A position where you threaten to complete two different lines forces your opponent to block one while you play the other.
  • Watch the square above. Before you drop a disc, check whether it lets your opponent play directly on top of it to complete a line. Many games are lost by "giving away" the space above.
  • Think in odd and even rows. Count rows from the bottom (row 1). In the endgame the first player usually benefits from threats on odd rows and the second player from threats on even rows, because of who is forced to play into each space as columns fill up.
  • Don't fill a column you need. If you have a threat waiting in a column, avoid playing beneath it yourself; let your opponent run out of safe moves instead.

How the computer opponent thinks

Easy plays mostly random moves with a preference for the middle, takes any immediate win and usually blocks a three-in-a-row. Medium always takes wins and blocks, then looks four moves ahead and picks randomly among moves that score almost as well as the best, so it plays sensibly but makes human-like mistakes. Hard runs an iterative-deepening negamax search with alpha-beta pruning, center-first move ordering and a transposition table. Within a time limit of about 1.5 seconds it typically reaches 10 to 13 moves deep, scoring positions by counting open lines of two and three for each side. It never misses a win in one move or a direct block, and it spots forced wins and losses many moves in advance.

Frequently asked questions

How do you win Connect Four?

Be the first to line up four of your own discs next to each other: horizontally, vertically or diagonally. If all 42 spaces fill up without anyone making four, the game is a draw.

Who goes first in Connect Four, and does it matter?

Red traditionally goes first, and it matters a lot: with perfect play the first player can always force a win by starting in the middle column. That is why this game lets you choose who starts or alternate between games.

How strong is the Hard computer?

Hard looks ahead more than ten moves using a negamax search with alpha-beta pruning, a position cache and a threat-based evaluation. It always takes a winning move and always blocks your immediate threats, so you need to set up two threats at once to beat it.

What is the best opening move?

The center column. It belongs to more possible lines of four than any other column, so discs there give you the most chances to build threats. The columns next to the center are the next best.

Can I play Connect Four with a friend?

Yes. Choose 2 players and take turns on the same screen. Red and Yellow alternate, and the score tally keeps track of both of you.

Can I undo a move?

Yes. Against the computer, Undo move takes back your last move together with the computer's reply. In 2-player mode it takes back one move at a time. Undoing after a finished game also removes that result from the score.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Tic Tac ToePlay tic tac toe against an unbeatable AI or a friend.MinesweeperPlay classic Minesweeper: 3 difficulties, flags, timer and a safe first click.Sudoku OnlinePlay free Sudoku with 4 difficulty levels, notes, hints and a timer.2048 GamePlay 2048 online with swipe controls, undo and best score.HangmanClassic friendly hangman word game with categories, hints and difficulty levels.SolitairePlay classic Klondike Solitaire with Draw 1 or Draw 3 and undo.Spider SolitairePlay Spider Solitaire online with 1, 2 or 4 suits, hints, unlimited undo and a timer.Play Chess vs ComputerPlay chess online against the computer at 8 difficulty levels.Snake GamePlay classic Snake online with speeds, wall modes and high scores.Block Puzzle GameClassic falling blocks puzzle game with levels and high score.Word Guess GameGuess the hidden five-letter word in six tries. Unlimited games, stats and hard mode.Memory Card GameFlip cards and match emoji pairs on 4×3 to 6×6 grids, with moves, timer and best scores.Flappy GameTap to flap a round chick through bamboo gaps and beat your high score.Dino Runner GameJump cacti and duck buzzing beetles in an original endless desert runner.Typing GameType the falling words before they land; level up and track your WPM and accuracy.Math Quiz GameTimed mental math rounds with four operations, five levels, streaks and high scores.Flag QuizGuess the flags of all 196 countries in four modes, from multiple choice to timed.Map QuizFind countries on a clickable world map or name the highlighted one, by continent.Periodic Table QuizLearn all 118 elements: quiz symbols, names and atomic numbers or click them on the table.Spelling Bee GameMake words from 7 honeycomb letters, always using the center letter. New daily puzzle.Jigsaw PuzzleTurn a sample picture or your own photo into a 12 to 150 piece jigsaw puzzle and solve it.Sliding PuzzlePlay the 15 puzzle and 3×3 to 6×6 sliding tile puzzles with numbers or your own photo.Mahjong SolitaireMatch pairs of free tiles to clear the Turtle and two smaller layouts, with hints, shuffle and undo.Scrabble Word FinderFind the highest-scoring words from your rack, with blank tiles, patterns and bingo bonus.Wordle SolverEnter your guesses and colours to see every possible answer and the best next guess.Crossword SolverFind words that fit a crossword pattern like c?t from the length and the letters you know.Word Search GeneratorMake a word search puzzle from your words, play it online or print it with an answer key.Pong GamePlay classic Pong online against the computer on 3 levels or with a friend, first to 11.Breakout GameClassic brick breaker game with levels, power-ups and lives. Play with mouse, touch or keyboard.Whack-a-MoleWhack the moles before they hide in 30 or 60 second rounds. Speed increases, best score saved.Simon Says GameRepeat the growing color and sound sequence. Classic memory game with strict mode and high score.CheckersPlay checkers online against the computer or a friend, with kings, undo and hints.ReversiPlay Reversi (Othello rules) online vs a 3-level computer or a friend, with move hints.GomokuGet five in a row on a 15×15 board against a smart computer or a friend.Battleship GamePlace your fleet and sink the computer's ships in this classic naval guessing game.FreeCellPlay FreeCell solitaire online with the classic numbered deals, undo, hints and auto-move.Mastermind GameCrack the secret 4-color code in 10 tries using black and white feedback pegs.Tower of HanoiPlay the Tower of Hanoi puzzle with 3 to 8 disks, or watch it solve itself in the fewest moves.Lights Out GameTurn off every light in the classic 5x5 puzzle, with solvable random boards and a solver.BackgammonPlay backgammon online vs the computer or a friend, with doubling cube, undo and match scoring.Bubble Shooter GameAim, bounce and match 3 or more colored bubbles to pop them before the ceiling comes down.World Capitals QuizGuess the capital city of every country, by region, with multiple choice or typed answers.Categories Game GeneratorRandom letter and 12 categories from a 700+ pool, with round timer, printable sheets and scores.Chinese CheckersPlay Chinese checkers on a star board for 2, 3, 4 or 6 players, against friends or the computer.3x3 Cube SolverPaint your scrambled 3x3 cube and get a short step-by-step solution with a 3D animation.Dominoes GamePlay draw or block dominoes with a double-six set against 1 to 3 computer players.Emoji QuizGuess the word, phrase, animal, food or movie from emoji clues. 370+ puzzles with hints.Funny Fill-in-the-Blank Story GeneratorWord game: fill in nouns, verbs and adjectives without seeing the story, then reveal it.Golf SolitairePlay Golf Solitaire online: clear 7 columns by playing cards one rank up or down. 9-hole scoring.Guess the Number GameGuess the secret number with higher/lower or warm/cold hints, or let the computer guess yours.Hearts Card GamePlay Hearts online against 3 computer players: pass cards, dodge the Queen of Spades, shoot the moon.Kakuro PuzzlePlay generated cross-sum kakuro puzzles in several sizes with pencil marks and a combination helper.Killer SudokuPlay generated killer sudoku puzzles with cage sums, pencil marks, a cage combo helper and hints.Ludo GamePlay Ludo online with 2-4 players or against the computer: roll, capture and race home.Match 3 GameSwap gems to match 3 or more, trigger cascades and special gems, and beat each level's target.Snakes and LaddersPlay the classic board game online with 2-4 players or against the computer.Space Shooter GameRetro arcade space shooter: blast alien waves and meteors, grab power-ups and beat your high score.Spades Card GamePlay Spades online with a computer partner: bid tricks or nil, trump with spades, avoid bags.Stack Tower GameTap to drop sliding blocks and build the tallest tower. Perfect drops earn bonus points.US States QuizFind the 50 states on a clickable US map, type them all from memory, or match state capitals.Virtual Bubble WrapPop endless bubble wrap with click, touch or drag. Satisfying pop sounds and a pop-it fidget mode.Word Grid GameFind words in a 4x4 or 5x5 letter grid by dragging across adjacent letters before time runs out.Word Ladder GameChange one letter at a time to turn one word into another. Daily and random word ladders.Chess PuzzlesSolve chess puzzles online: mate in 1, 2 and 3 plus tactics, with hints, a rating and streaks.Clicker GameIdle clicker: mine gems, hire builders, buy upgrades, rebirth for stars and earn while you're away.Color by NumberTap numbered pixels to color pictures, or turn your own photo into a color by number puzzle.Online Coloring PagesColor animal, holiday and mandala pages online with bucket fill and brushes, then print or save PNG.Connections Word PuzzleGroup 16 words into 4 hidden categories. New daily puzzle, full archive, shareable results.
See all 141 Online Games →