Other blogsGuides

A word jumble solver in a dozen lines, and why the clue still wins

The sorted-letter trick behind every solver, a short JavaScript version to run, and the rows on TechTwitter IO's daily Jumble that beat it.

A word jumble solver works by sorting letters: sort the scramble alphabetically, sort every word in a dictionary the same way, and return the words whose sorted letters match. You can write one in about a dozen lines of JavaScript, and it handles most plain-English scrambles at once. It also misses exactly the rows that make TechTwitter IO's daily buzzword Jumble fun, and the reasons are worth knowing before you reach for one.

The trick: one key per set of letters

Two words are anagrams when they use the same letters the same number of times. Sort the letters of each and they turn into the same string. TENSOR and STONER both become ENORST. So a solver builds an index once, keyed by sorted letters, and then answers any scramble with a single lookup instead of trying every ordering. A nine-letter scramble has hundreds of thousands of orderings; the sorted key skips all of that.

The code

Save a plain word list, one word per line, as words.txt. Then save this as solve.mjs and run it with Node:

// node solve.mjs words.txt STONER
import { readFileSync } from "node:fs";

const [file, scramble] = process.argv.slice(2);
const key = (word) => word.toLowerCase().split("").sort().join("");

const index = new Map();
for (const line of readFileSync(file, "utf8").split(/\r?\n/)) {
  const word = line.trim().toLowerCase();
  if (!/^[a-z]+$/.test(word)) continue;
  if (!index.has(key(word))) index.set(key(word), new Set());
  index.get(key(word)).add(word);
}

const hits = [...(index.get(key(scramble)) ?? [])];
console.log(hits.length ? hits.join(", ") : "no match");

The output is every word in your list built from exactly those letters. Reading the file and building the map is the slow part; after that, each lookup is one map read.

Where a solver gets it wrong

Several answers, no way to choose. On 26 October 2026, the TechTwitter IO Jumble printed STONER as one of its scrambles. With a list that holds all four words, the script above prints tensor, stoner, toners and noters. Only the clue, Cores that were half asleep, tells you which one the paper wanted.

Names and jargon. The same edition scrambled a company name into NSASGUM. A typical dictionary file has no brand names, so the solver says no match. Buzzword puzzles lean on product names, model names and company names, which is the biggest gap.

Words newer than your list. Fresh coinages and this month's product names are not in a file someone built years ago. If a word was not in the list, the solver cannot return it.

The fix for the last two is cheap: append your own lines. Company names, model names and the answers from old puzzles all make the list better at this kind of jumble.

Solver or head: which wins when

Situation Solver Solving by hand
Common word, one arrangement Exact and immediate Quick once the ending shows
Several valid arrangements Lists them all, picks none The clue picks one
Brand or product name Misses it unless you add it Easy if you read the news
Scramble that is already a word Returns it with the rest The clue warns you it is a trap

What about pasting it into a chatbot

You can paste a scramble into an AI assistant, but it writes a likely answer rather than looking one up. Check that the answer uses exactly the given letters, the same number of times. The key function above is a one-line way to do it: if the two sorted strings differ, the answer is wrong.

The classic Jumble's final step

The newspaper Jumble, which the Chicago Tribune now hosts on its free games site, ends with a phrase built from circled letters, often more than one word. A single-word solver like this one does not split letters across several words, so that last step stays a human job.

A fair way to use one

Try each row by hand first and lean on the clue. Use the solver to confirm a guess or settle a row you have given up on. On TechTwitter IO that row also has a Reveal button, and the next day's paper prints the answers in its Yesterday's Answers panel, upside down until you tick No peeking. The paper itself is satire, by its own footer, but the answers are real words you can check.

Browse guides by topic