---
title: "How a crossword generator fills a grid | Once Books"
description: "Our crossword maker doesn't fill a black-square skeleton from a dictionary. It lays your words onto an open grid so each one crosses another. Here is how."
source: "https://www.oncebooks.com/blog/how-crossword-generators-fill-a-grid"
---

1. [Home](https://www.oncebooks.com/)
2. [Blog](https://www.oncebooks.com/blog)
3. How a crossword generator fills a grid

Blog

# How a crossword generator fills a grid

[The Once Books team](https://www.oncebooks.com/authors/team) · 14 November 2026 · 7 min read

- [crossword](https://www.oncebooks.com/blog/tag/crossword)
- [engineering](https://www.oncebooks.com/blog/tag/engineering)
- [kdp](https://www.oncebooks.com/blog/tag/kdp)

There are two ways to build a crossword, and they are completely different programs. The newspaper style starts with a fixed grid of black and white squares and fills the white runs from a dictionary of tens of thousands of words. The style we use starts with nothing but your own answers and lays them onto an empty grid so that each new word crosses one already there. The blocks aren't designed; they're simply the squares no word reached. This is the "open" or criss-cross crossword, and here is how the placer actually works.

## Cross something, or don't place at all

The one rule that makes it a crossword and not a word search: after the first answer, every word must cross an existing one at a shared letter, and otherwise touch nothing. The placer enforces the second half carefully. A candidate position is rejected unless the cell before the word starts and the cell after it ends are empty, and every non-crossing letter has empty squares to either side. Without that, two words run shoulder to shoulder and you get accidental two-letter "words" down the join. A floating word that crosses nothing is refused outright, because a floating word in an open grid is a word search, not a crossword.

## Longest first, and a seeded shuffle

Answers are placed longest first. Long words are the hardest to fit and, once down, they offer the most crossing letters for everything after them, so leading with them builds a denser grid. The order is otherwise a seeded shuffle, which is what gives two puzzles from the same word bank their own distinct layouts while staying perfectly reproducible from a seed.

## The multi-pass sweep (and the bug that forced it)

The obvious design is one pass: walk the word list, place each where it best crosses, done. We built that first, and it produced grids at barely half the target number of entries. The reason is that a word which can't cross anything yet, early on, is gone for good in a single pass, even though later placements would have given it a home. So the placer sweeps the list repeatedly, placing whatever it can each time, and only stops when a whole pass adds nothing. That one change roughly doubled how full the grids came out.

A related trap sits in the crossing requirement. Relax it too eagerly ("allow a word that crosses nothing this once") and one relaxed pass swallows every remaining answer before the grid is dense enough to cross them. Let it decay steadily and, by the time the grid is big enough, the demand has fallen to one crossing anyway and every grade comes out identically chained. The requirement has to step down and then re-tighten, which is less obvious than it sounds.

## Best of four

A criss-cross grid's final size depends heavily on where the first few answers happen to cross, so a single attempt is a coin toss between a full grid and a thin one. The generator runs the placer four times from derived seeds and keeps the fullest result. It's a cheap hedge against a bad opening.

## What we check before it ships

A crossword isn't "unique" the way a sudoku is; it's defined by its clues. So the guarantee is structural, checked by a validator before a puzzle is accepted: the grid is one connected piece (not two islands), every run is at least three letters, every entry's cells spell its answer, every entry has a clue, no clue gives its own answer away, no answer appears twice, and, as a [drift](https://www.oncebooks.com/glossary#drift)-catcher, re-numbering the finished grid from scratch reproduces the stored clue list exactly. A grid that fails any of these is rejected rather than printed.

One honest limit worth knowing: in an open criss-cross there are really only two distinguishable "difficulty by crossings" settings (weave freely, or cap at one crossing), so most of what separates an easy book from a hard one is the word-length window, not the crossing count. We tune the grades by length first.

Proving a grid one way is the sibling idea behind our sudoku, written up in [how we make sure every sudoku has one solution](https://www.oncebooks.com/blog/how-we-guarantee-one-solution-sudoku). To see this placer run, the [free crossword generator](https://www.oncebooks.com/tools/crossword-generator) builds a grid from your words in the browser; for a whole graded book, the [KDP crossword maker](https://www.oncebooks.com/kdp-crossword-maker) runs it in a worker, and [how to make and sell crossword books on KDP](https://www.oncebooks.com/blog/how-to-make-and-sell-crossword-books-on-kdp) covers the rest.

## Try the tool

Free, in your browser, no sign-up. Make one, then build the whole book in the studio.

[Crossword generator Type your clues, then print the crossword and its answer key from your browser. Try it free](https://www.oncebooks.com/tools/crossword-generator)

## Questions parents ask

**How does a crossword generator work?**

Two ways exist. The newspaper style fills a fixed black-square grid from a huge dictionary. The open "criss-cross" style, which we use, lays your own answers onto an empty grid so each new word crosses one already placed, and the blocks are just the squares no word reaches. We build from your word-and-clue list, not a dictionary.

**Does a crossword have a single solution?**

Not in the way a sudoku does. A crossword is defined by its clues, so "unique" isn't the bar. What we verify instead is structural: the grid is one connected piece, every run is three letters or more, no clue gives its own answer away, and re-numbering the finished grid reproduces the clue list exactly.

**Why are there no two-letter words in a crossword?**

Two-letter entries are unsolvable filler in every crossword tradition, so we forbid them twice: a placement can't leave two letters shoulder to shoulder, and the final check rejects any run shorter than three.

## Related reading

- [Why our Kakuro grids stop at 7 by 7](https://www.oncebooks.com/blog/why-our-kakuro-grids-stop-at-7x7) — Our Kakuro generator builds a grid, reads off the sums, and keeps it only if it proves unique. Past 7 by 7 a random grid is almost never unique, so that's the cap.
- [How we check a Kakurasu has one solution](https://www.oncebooks.com/blog/how-we-check-a-kakurasu-has-one-solution) — Kakurasu is generated the lazy way: shade a random grid, read off the totals, and keep it only if the solver proves it unique. Why that works, and the pruning.
- [Why our Skyscrapers puzzles cap at 5 by 5](https://www.oncebooks.com/blog/why-our-skyscrapers-puzzles-cap-at-5x5) — Our Skyscrapers generator stops at 5 by 5, while sudoku goes to 9. The reason is the solver: visibility logic is sound but weak, so a 6 by 6 gets slow to prove.

## Keep reading

- [Answers](https://www.oncebooks.com/answers) — One sharply-scoped question per page, cost, safety, timing, printing, answered in a couple of sentences before the detail.
- [Glossary](https://www.oncebooks.com/glossary) — Plain definitions of the vocabulary: the Character Sheet, the Consistency Engine, style profiles, drift.
- [Help centre](https://www.oncebooks.com/help) — Task-shaped instructions for making, printing and sharing a book once you have started one.

[← All posts](https://www.oncebooks.com/blog)

Try this tool

[Crossword generator Type your clues, then print the crossword and its answer key from your browser. Try it free](https://www.oncebooks.com/tools/crossword-generator)
