Inside the Solver

How the Crossword Solver Works: Pattern Matching Explained

By LK Forge  ·  4 min read  · 

Stuck on a clue with a few letters filled in? The crossword solver does not try to understand the clue — it does something faster and more reliable: it treats the squares you have filled as a fixed pattern and finds every real word that could possibly fit. Type c_t and it returns cat, cot, cut. Behind that is a dictionary of 172,835 English words, searched in a couple of milliseconds.

Letters and Blanks Become a Pattern

You give the solver two things: the letters you are sure of, and an underscore for each empty square. It reads that as a template of a specific length — some positions pinned to a letter, the rest free. A candidate word matches only if it is exactly that long and every pinned position agrees. The underscores are wildcards; the letters are constraints.

Compiled to a Regular Expression

Rather than compare letter by letter, the solver compiles your pattern into a regular expression — each underscore becomes a single-character wildcard, each letter stays literal — and tests it against the whole word list. Regex matching is heavily optimised in the browser, so scanning 172,835 words takes only a few milliseconds. Everything runs on a bundled dictionary in your browser; nothing is sent to a server.

Measured: Every Fit, Instantly

A few example patterns against the shipped dictionary — the number of real words that fit, and how long the search took:

PatternMatchesTimeExamples
c_t3~4 mscat, cot, cut
app__4~3 msappal, appel, apple, apply
_r_ss15~1 msbrass, crass, cress, cross…
cr_ssw_rd1~2 mscrossword

Measured against the shipped 172,835-word dictionary. The more letters you pin, the fewer — and more useful — the results: a nine-letter pattern with two blanks often narrows to a single word.

Reproduce It Yourself

The idea in a couple of lines — turn the pattern into a regex and filter the dictionary:

function match(pattern, words) {
  const re = new RegExp('^' + pattern.replace(/_/g, '.') + '$', 'i');
  return words.filter(w => re.test(w));
}
match('c_t', ['cat','dog','cot','cut','cart']);   // ['cat','cot','cut']

Frequently Asked Questions

Is there a crossword solver for missing letters?

Yes — this page's crossword solver is a free in-browser tool. Type the letters you have and an underscore for each blank, and it lists every real word that fits. No sign-up.

What algorithm does the crossword solver use?

Pattern matching against a dictionary. Your letters and blanks become a pattern — each underscore matching any single letter — compiled to a regular expression and tested against a 172,835-word list. Every word of the right length whose fixed letters agree is returned. Not a generative-AI or LLM wrapper.

How do I enter a pattern?

To enter a pattern, type the letters you know and an underscore for each empty square. For example c_t returns cat, cot and cut; app__ returns appal, apple and apply; cr_ssw_rd resolves to crossword. Longer patterns work the same way — a seven-letter word with three unknowns still resolves in the same one-to-five-millisecond lookup.

How big is the dictionary?

The dictionary holds 172,835 English words. A typical pattern is matched against the whole list in one to five milliseconds. Results appear as you type, updating with every letter or underscore you add.

Is the crossword solver free?

The crossword solver is completely free, no account required. It runs client-side in your browser, so nothing you type is uploaded. There's no sign-up and no limit on how many patterns you search.

OPEN THE CROSSWORD SOLVER