How Wordle’s Algorithm Actually Works (No Magic)

Young girl in a blue dress playing with a colorful educational toy indoors.

Wordle looks like it might be doing something clever — generating the daily word, evaluating your guesses, telling you which letters are right and where. Most of that is much simpler than it looks. The “algorithm” behind Wordle is two hardcoded word lists, a date-based index, and a string-comparison loop. Understanding how Wordle’s algorithm works takes about ten minutes, and once you see it, the bot strategies that minimize expected guesses become much less mysterious.

Key takeaways

  • Wordle’s daily word is selected from a hardcoded list of around 2,300 answers, indexed by the date.
  • The original game accepted roughly 13,000 five-letter words as guesses — far more than the answer list.
  • The feedback algorithm is a deterministic loop comparing each guess letter to the answer.
  • Optimal starting words and bot strategies are derived by minimizing expected remaining solutions across the entire answer set.
  • The NYT acquired Wordle in 2022 and its editors now choose the answers.

The answer list

The single most important thing to understand about Wordle is that the daily word is not generated. It’s looked up. The game ships with a hardcoded array of valid answers — somewhere around 2,300 words in the original Josh Wardle version — and selects today’s word by index.

The original answer list was visible in the source code on the page. Anyone who opened the browser developer console and inspected the JavaScript could see the entire ordered list of answers for the next several years. This was widely reported in 2022 and led to several internet “Wordle answer of the day” sites that just looked up the public array.

The list was curated before launch: Josh Wardle’s partner, Palak Shah, went through the five-letter words and kept the ones she recognized. The result was a list of reasonably common words with very few plurals and little obscure vocabulary.

The valid-guess list

Separately, Wordle accepts a much wider list of inputs as valid guesses — roughly 13,000 five-letter words in the original, counting the answers. This list was also hardcoded. If you type a five-letter combination that isn’t on either the answer list or the broader valid-guess list, the game rejects it with “Not in word list.”

The split is intentional. The answer list is curated for fairness and accessibility; the valid-guess list is broader to allow strategic guesses (low-frequency letters, awkward letter combinations) even when those words would never be selected as answers.

The date-to-answer mapping

The original Wordle calculated the day’s index by subtracting a fixed epoch date from today’s date and using the difference as an array index. The fixed epoch was June 19, 2021 — the date of puzzle #0, months before the game went public in October 2021. So Day 0 was the first puzzle, Day 1 was the next day’s, and so on.

This meant that anyone who reverse-engineered the JavaScript could trivially compute tomorrow’s word. It also meant that everyone on Earth playing on the same calendar day saw the same word, which was the central social hook — when you posted your daily score grid, everyone reading it had played the same puzzle.

Later in 2022, after the NYT acquisition, the date-to-answer mapping was moved server-side. The game now fetches the day’s word from the NYT’s servers rather than computing it from a public client-side array. The change made next-day-lookup harder but didn’t fundamentally alter the algorithm.

The feedback algorithm

When you submit a guess, Wordle compares it to the answer letter by letter and produces a five-color feedback string. The colors mean:

  • Green — correct letter in the correct position.
  • Yellow — correct letter in the wrong position.
  • Gray — letter not in the answer (or already accounted for elsewhere).

The implementation is a two-pass loop:

  1. First pass: mark all letters that match position exactly (greens). Track which answer-letters are now “used.”
  2. Second pass: for each remaining guess letter, check whether it appears elsewhere in the answer among the still-unused letters. If yes, mark it yellow and consume one occurrence. If no, mark it gray.

The two-pass structure handles the tricky case of repeated letters correctly. If the answer is ROBOT and you guess BOOST, the O in position 2 is green (an exact match), and the O in position 3 is yellow, because the answer still has an unmatched O in position 4. Guess BOOST against the answer BOARD instead and the second O turns gray, since BOARD’s only O was already consumed by the green — positional matches are resolved first, then leftovers are counted.

Why the algorithm matters for strategy

Because the answer list is fixed and known, optimal Wordle strategy is a solved problem. You can enumerate the entire ~2,300-word answer space and compute, for any given starting word, the expected number of remaining candidates after each possible feedback outcome.

Grant Sanderson covered this in detail in a 3Blue1Brown video titled “Solving Wordle using information theory,” which showed how to compute the expected information gain of each possible guess and rank starting words by their average performance. The video became a popular reference in the Wordle bot community.

The general result is that good starting words have high coverage of common letters (E, A, R, O, T, L, S, N, I) and avoid letter repetition (which wastes feedback). Common starters in optimization-minded play include SLATE, CRANE, TRACE, SALET and SOARE; the popular ADIEU covers vowels but scores worse in solver analyses. With perfect play, the best starters solve the original answer list in an average of about 3.4 guesses.

For a deeper guide to starting words specifically, see our best Wordle starting words piece.

How bots solve Wordle

A Wordle solver bot works in two phases per turn:

  1. Maintain a candidate set of answer-list words consistent with all feedback received so far.
  2. Choose a next guess that maximizes expected information about which word in the candidate set is the answer.

The information-maximizing guess isn’t always a word from the remaining candidates. Sometimes you’ve narrowed the candidates to four or five possibilities, and the best move is to guess a word from the broader valid-guess list that contains letters distinguishing among those candidates — even though that guess can’t be the answer.

This is called a “probing” guess. Wordle players who don’t use bots often miss probing opportunities, defaulting to “guess one of the remaining candidates” even when probing would resolve the puzzle in fewer expected guesses.

The NYT era and curation changes

The New York Times acquired Wordle from Josh Wardle in January 2022 for a price reported as being in the low seven figures. The NYT initially kept the original answer list largely intact but began curating it more aggressively over time — removing words considered too obscure, too offensive, or too political for a general audience.

Since late 2022, a NYT editor has picked the daily answers rather than following the original order, and the paper has swapped out scheduled answers when current events made them awkward. The selection process isn’t public, and the queue is no longer a public hardcoded array.

The valid-guess list (the wider list of acceptable inputs) has also been adjusted over time, with words added and a few removed.

Why the algorithm choices matter

Wordle’s design decisions look small but were intentional. The hardcoded answer list with a date index made the game synchronous globally — every player got the same word on the same day, which was the foundation of the social-sharing virality. The two-list separation (curated answers vs broader valid guesses) made the game fair without making it artificially restrictive. The five-letter length and six-guess limit produced a difficulty curve that rewarded skill without making the puzzle unsolvable.

The fact that the algorithm is deterministic and the answer list is finite is why Wordle works as a “shared experience” game in a way procedurally-generated puzzle games don’t. Wordle isn’t just a word game — it’s a synchronized one.

For more on why Wordle reached the cultural moment it did, see our why Wordle blew up piece.

What Wordle isn’t doing

Wordle isn’t using any AI, NLP, or generative model. There’s no “difficulty adjustment” based on your past performance. There’s no per-player word selection. The game’s complete logic could be implemented in a few hundred lines of JavaScript, and the social hook does most of the work.

This is part of why Wordle’s success is interesting — the game is so simple that anyone who looks at it asks “why didn’t I think of that?” The answer is usually that the obvious-in-hindsight idea needed its social-sharing format (the colored-square emoji grid, which Wardle added after seeing players share results that way) to find its audience.

For an algorithm-free break

If you’d rather not think about word lists and probability for a few minutes, the Chrome Dino game running on this site is the opposite kind of game — one obstacle, one button, no curated answer list. Both are well-designed in their own ways, and both reward the brain for completely different reasons.

Frequently asked questions

How does Wordle pick the daily word?

Wordle uses a hardcoded list of around 2,300 curated answers, indexed by the date relative to a fixed epoch (June 19, 2021). Under the NYT, the answer is served from the paper’s servers and chosen by an editor, but each day still has one answer for everyone.

Is Wordle’s answer the same for everyone?

Yes. Every player gets the same word on the same calendar day. This is the foundation of Wordle’s social-sharing model — the colored-square score grids posted on social media are all from the same puzzle, which is what makes them shareable.

How many possible Wordle answers are there?

The curated answer list contains around 2,300 words. The broader valid-guess list (words you can type as a guess even though they won’t appear as answers) was roughly 13,000 words in total. The NYT has modified both lists since acquiring the game.

What is the best Wordle starting word?

Information-theoretic analysis (notably 3Blue1Brown’s video on the topic) suggests starters like SLATE, CRANE, TRACE, and SOARE perform near the top on the original answer list. The differences between top starters are small in practice — any word with high coverage of common letters and no repeats performs well.

Can Wordle be solved by a bot?

Yes, easily. Because the answer list is finite and known, a bot can maintain a candidate set and pick information-maximizing guesses each turn. Optimal bots solve the original answer list in an average of around 3.4 guesses and never need all six.

The bottom line

Wordle’s algorithm is unglamorous — two word lists, a date index, and a comparison loop. The genius wasn’t in the code; it was in the curation, the share format, and the synchronous daily structure. Once you see how it works, the game becomes a tractable optimization problem. Whether you’d rather play it that way or just for fun is a personal choice.

🔌 Connect any AI assistant to dinogame.gg — we run an MCP server: https://dinogame.gg/mcp