Player (X) 0
Ties 0
Bot (O) 0

Play tic tac toe online — the polished way

Tic Tac Toe Cosmic is a free tic tac toe game you can play directly in your browser. No signup, no download, no advertising. Open the page and the board is there. The whole thing weighs in at a handful of kilobytes because we don't ship a framework, an analytics SDK, or a single tracking pixel.

You get three ways to play. Pick vs Bot for a single-player game against an AI you can dial up or down — the Unbeatable level runs a full Minimax search and never loses. Pick Local to share the same device with a friend or a child. Pick Online to generate an invite link and play tic tac toe online against anyone in the world over a peer-to-peer WebRTC connection. No accounts, no matchmaking queue.

Four hand-crafted visual themes — Cyberpunk, Cosmo Royale, Retro 8-Bit, and Minimalist — let you tune the look to your taste, and every sound effect is synthesised live with the Web Audio API. Your scores, streaks, and preferences live in your own browser; nothing is sent anywhere.

How to play tic tac toe: rules, modes, and strategy

Tic tac toe (also known as noughts and crosses, X's and O's, or "jogo do galo" in Portuguese) is one of the oldest pencil-and-paper games still actively played. The rules are unchanged from the version most people learn as kids, but the game has a small amount of real strategic depth once you start playing seriously.

The basic tic tac toe rules

Two players — X and O — take turns placing their symbol in one of nine cells on a 3×3 grid. The first to line up three of their own symbols in a row, column, or diagonal wins the round. If all nine cells fill up without a winner, the round is a draw. X always plays first, which is the standard convention. In this version, the X player has a small theoretical edge — but if both sides play optimally, every game ends in a draw.

Game modes

Tic tac toe difficulty levels

Tic tac toe strategy: how to never lose

Whether or not you can win at tic tac toe comes down to how you handle a few key positions. With perfect play you can always force at least a draw — here are the heuristics that get you there.

Why play tic tac toe here

Most free tic tac toe sites are wrapped in advertising, demand an email, or look like they haven't been touched since 2010. Tic Tac Toe Cosmic exists because none of that needed to be true.

The page loads instantly because there is no framework runtime, no analytics SDK, and no third-party tracking. Sound effects are synthesised at play time with the Web Audio API instead of shipping audio files, so the entire game is a handful of kilobytes. The online tic tac toe mode connects players directly through peer-to-peer WebRTC, which costs us nothing to run and means your moves don't travel through a central server — they go straight from your browser to your opponent's.

Your stats, streaks, and difficulty preferences are stored only in your own browser. The game respects iOS safe areas, supports the Android home indicator, and works on any modern device down to entry-level phones. If you've been searching for a tic tac toe game online that respects your time and your attention, this is that game. Free forever, ad-free forever, and crafted with the same care you'd bring to a piece of native software.

Tic tac toe FAQ

Is Tic Tac Toe Cosmic really free to play?

Yes, fully free. No ads, no signup, no in-app purchases, and no premium tier. The game is a passion project that costs us almost nothing to run, and we'd rather keep it open than monetise it.

Do I need to install anything to play tic tac toe online?

No. Tic Tac Toe Cosmic runs in any modern browser on desktop, tablet, or phone. There's no app store version because there doesn't need to be — you can add the page to your home screen on iOS or Android and it behaves like a native app.

How do I play tic tac toe online with a friend?

Choose the Online mode and the game will generate a shareable invite link. Send the link to your friend (WhatsApp, Discord, SMS, anywhere). When they open it, the match starts instantly. The connection is peer-to-peer over WebRTC, so there's no game server in the middle and no matchmaking queue to wait in.

Can I beat the Unbeatable tic tac toe AI?

No, and that's by design. Unbeatable mode runs a full Minimax search through every possible continuation of the game and always picks the optimal move. Tic tac toe is mathematically a solved game — with perfect play on both sides it always ends in a draw. The best you can hope for against Unbeatable is to force that draw.

What is the difference between Easy, Medium, and Unbeatable?

Easy plays random legal moves with no strategy — great for kids or a warm-up. Medium blocks your immediate threats and uses Minimax most of the time, but occasionally plays randomly, so it can lose to a sharp opponent. Unbeatable always plays the optimal move and never loses, only draws.

What is the best opening move in tic tac toe?

The centre square. It touches four of the eight possible winning lines (one row, one column, and both diagonals), more than any other cell. From the centre opening you cannot lose with optimal play — but if you give it up, you let your opponent reach the strongest position on the board.

How long does a game of tic tac toe take?

A complete game rarely lasts longer than two minutes. The longest possible game is nine moves, and most experienced players finish in five to seven. The Unbeatable bot moves almost instantly — there's a small intentional delay so it doesn't feel jarring, but the Minimax computation at a 3×3 board size is essentially free.

What is a "fork" in tic tac toe?

A fork is a move that creates two threats at the same time, so your opponent can only block one of them — you win on the next move. Forks are how skilled players (and the Unbeatable bot) finish games against weaker opponents. The fastest way to learn them is to play the Unbeatable bot a few rounds and watch where it places its second move.

Does the game work on mobile and tablet?

Yes, completely. The layout is fully responsive, the controls are sized for touch (44px minimum tap targets), and the iOS safe area is respected so the action buttons never sit under the home indicator. The game also handles viewport changes — rotation, browser chrome appearing or disappearing — without breaking.

How do I change the visual theme?

Use the theme button in the top right corner. Four themes are available: Cyberpunk (the neon default), Cosmo Royale (gold and starlight), Retro 8-Bit (CRT green), and Minimalist (clean light). Your choice is remembered between visits via localStorage — no server involved.

Is my game data sent anywhere?

No game data ever reaches our servers because we don't run game servers. Scores and stats are stored in localStorage in your own browser. Online matches use peer-to-peer WebRTC, which only routes through a public signaling broker (PeerJS) for the initial handshake — once connected, the moves travel directly between you and your opponent.

Can I play tic tac toe offline?

Once the page has loaded for the first time, the single-player modes (vs Bot and Local) work without an active network connection — only the Online mode obviously needs the internet. A full offline-capable progressive web app version is planned for a future release.