The guide
Nonsense With Rules: What Random Text Is Honestly Made Of
Filler text can come from a table and a seed that anyone can inspect, and the rules explain both why it looks like language and where it starts to copy.
- 27 symbols Shannon's alphabet: 26 letters and a space
- 7 words longest copied run in the worked example at order 2
- 2^128 - 1 period of the xor128 generator
- 192.0.2.0/24 one of three IPv4 blocks reserved for documentation
- 1,000 numbers in each UK telephone range recommended for drama
Read the full guide Fold the guide
A designer needs text before the text exists. The page has a headline slot, three cards and a long column, and nobody has written a word for any of them. What goes in must look like language at a glance and mean nothing on a second look, because filler that means something gets read, argued over and, sooner or later, shipped by accident.
There is a tidy way to make such text, and it is older than the web. It needs a table of counts, a source of numbers and a rule for turning one into the other. Every part can be laid on the desk and checked. That openness is the argument of this piece: random text is most useful when its randomness is a mechanism you can see, repeat and explain, not a mood.
Shannon’s ladder
In 1948 Claude Shannon set out to show how a series of simple random processes can approach a natural language, and he did it by building English badly, one rung at a time. He worked with 27 symbols, the 26 letters and a space. On the lowest rung every symbol is equally likely and independent, and the result is a wall of letters. On the next, each symbol is still drawn independently but with the frequency it has in real text, so that E turns up about twelve times in a hundred and W about twice.
Then the rungs start to remember. In his second-order approximation each letter is chosen according to how often it follows the letter before it, which needs a table of letter pairs. In the third-order approximation each letter depends on the two before it. The strings begin to hold fragments a reader can almost pronounce, and one of his third-order lines contains the lovely non-words “CRATICT FROURE BIRS GROCID”.
He then changed the unit. Instead of pushing on to four and five letters he jumped to whole words, first drawing words independently by their frequency, then drawing each word by how often it follows the previous one. That last rung produced the opening “THE HEAD AND IN FRONTAL ATTACK ON AN ENGLISH WRITER”, a line with no meaning and an unmistakable accent.
A process of this kind, where the next step depends only on where you are now and not on how you got there, is a Markov chain. The present state here is simply the last few symbols. Nothing about grammar, meaning or the world is stored anywhere; there is only a table saying what came after what, and how often.
Why low orders babble and high orders copy
The whole character of chain text comes from one number, the order. At order 1 nothing depends on anything, so the output is a shuffle of the sample’s vocabulary. Raise the order and each choice is hemmed in by more context, which makes the text more fluent. It also makes it less free, and the reason is arithmetic, not style.
A long context is a rare context. In a short sample most pairs of neighbouring words occur exactly once, so after such a pair the table offers exactly one successor. The chain has no choice to make. It walks along the original sentence until it reaches a context that occurred twice, takes the other exit, and walks along a different original sentence. High-order output is a collage of quotations with the seams hidden.
This can be measured, and it should be. Here is a worked case that can be reproduced in the tool above. Train the word chain on the built-in harbour sample, 420 words of which 167 are different, with the seed harbour-7 and three paragraphs asked for. The text comes out at 151 words. At order 1 the longest run that also appears word for word in the sample is 2 words. At order 2 it is 7 words. At order 3 it is 14 words, a full clause lifted intact.
The table explains the jump. At order 2 it holds 167 contexts, and 103 of them have a single possible successor. At order 3 it holds 322 contexts, and 279 of them have only one way forward. When more than eight contexts in ten are dead straight, the chain is reciting.
That matters beyond aesthetics. If the sample is somebody’s article, a high-order chain will hand back recognisable stretches of it, and the person who pasted the sample is the one answerable for the rights in it. A generator ought to report the longest verbatim overlap every time and say so plainly when it is long.
Words that were never words
A second family of filler needs no sample at all. Speakers carry a sense of which sound sequences their language allows, and it is specific. A syllable has a nucleus, usually a vowel, which is the only part that must be present. Consonants before it form the onset and consonants after it form the coda. English is generous with onsets, as the three consonants that open the word screens show, but no English syllable begins with the cluster mbl.
Build a small table of permitted onsets, nuclei and codas, give each a weight, and draw one from each column. The result is a pseudo-word: something like panzen or clotmet that no dictionary holds and any English reader can say aloud. Chain a few syllables and vary the length, and a paragraph of the stuff has the grey texture of prose with no risk of meaning anything.
There is one risk, and it is worth being candid about. Syllables assembled at random will now and then spell something rude. A short block list catches the obvious cases; in a run of one million raw draws from the tables used here, 17,317 were thrown out. No such list is complete. It knows one language, it cannot see what two innocent words suggest side by side, and it has never heard this year’s slang.
A seed is a promise, not a secret
Every method above consumes numbers, and where they come from decides what the text is good for. A seeded generator starts from a value and applies simple arithmetic to produce a sequence. Marsaglia’s xorshift generators do it with a handful of shifts and exclusive-or operations per step, and the version that keeps four 32-bit words has a period of 2^128 - 1 before the sequence repeats.
For design work the seed is the whole point. The same seed and settings give the same text tomorrow, on another machine, in a bug report, in a screenshot that has to be retaken after a layout change. A reviewer who asks why the third card wraps badly can be given a seed in place of an attachment.
The same property makes seeded output worthless as a secret. The security literature is blunt: traditional sequences that start from a seed are not suitable for cryptographic use, because anyone who learns or guesses the seed can replay everything that follows. A browser has a separate facility for cryptographically strong random values. Text made from a visible seed should never become a password, a key or a token.
One more detail separates careful generators from careless ones. Turning a 32-bit random word into a whole number in a range by taking a remainder favours the low results slightly, and unbiased methods discard the few words that would cause the tilt. A chi-square goodness-of-fit test, which sums the squared gaps between observed and expected counts in each bin, shows the difference. One million draws sorted into 96 bins scored 92.62 with rejection, against a critical value of 143.344 for 95 degrees of freedom. A plain remainder over the same awkward range scored over 124,000.
Fake data that cannot hurt anyone
Mock-ups also need names, addresses and numbers, and here invention is dangerous in a different way. A made-up email address may belong to someone. A made-up telephone number may ring.
The standards bodies foresaw this. Four top-level domain names are reserved so that they can never clash with a real one: .test, .example, .invalid and .localhost. The second-level name example is reserved under .com, .net and .org as well, which is why example.org is safe in a screenshot. For addresses, three IPv4 blocks are provided for documentation, 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24, and IPv6 has the prefix 2001:DB8::/32 for the same job.
Telephone numbers are a national matter. The United Kingdom regulator recommends ranges for television and radio drama, 1,000 numbers in each, and states that they cannot be allocated to communications providers. The range with no area code runs from 01632 960000 to 960999. Where no regulator has published such a range, the honest choice is to print no number.
Names are the hardest case, since any list of real names describes real people. Assembling a name from the same syllable tables avoids the list entirely, though chance can still produce a name that somebody bears.
Even the file formats have rules worth keeping. A CSV record ends with a carriage return and line feed, and a field containing a comma, a quotation mark or a line break is enclosed in double quotes with any inner quote doubled. JSON has its own grammar for strings and arrays. Counting has a rule too: a character, as a reader understands it, is a grapheme cluster, which may be several code points long.
None of this makes the text good. A chain has no idea what a sentence is for, a pseudo-word carries no etymology, and an invented record proves nothing about real data. What the rules buy is narrower and more useful: filler whose every word can be traced to a table, a draw and a seed, and whose limits are written on the tin.
Sources
Every source consulted for this guide. Links checked October 10, 2026.
- A Mathematical Theory of Communication (Shannon, C. E., 1948) Bell System Technical Journal 27(3), record at OpenAlex
- Markov chain Wikipedia
- Xorshift RNGs Journal of Statistical Software
- Fast Random Integer Generation in an Interval arXiv
- 1.3.5.15. Chi-Square Goodness-of-Fit Test NIST/SEMATECH e-Handbook of Statistical Methods
- 1.3.6.7.4. Critical Values of the Chi-Square Distribution NIST/SEMATECH e-Handbook of Statistical Methods
- RFC 4086: Randomness Requirements for Security RFC Editor
- Crypto: getRandomValues() method MDN Web Docs
- 3.4 Syllable Structure Essentials of Linguistics, eCampusOntario
- RFC 2606: Reserved Top Level DNS Names RFC Editor
- RFC 6761: Special-Use Domain Names RFC Editor
- RFC 5737: IPv4 Address Blocks Reserved for Documentation RFC Editor
- RFC 3849: IPv6 Address Prefix Reserved for Documentation RFC Editor
- Telephone numbers for use in TV and radio drama programmes Ofcom, copy at the Internet Archive
- UAX #29: Unicode Text Segmentation Unicode Consortium
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files RFC Editor
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format RFC Editor