Markov Text Generator
Create deterministic text by building an order-n Markov model from a corpus. Adjust order (chain depth), words (output length), and corpus to generate varied text output.
Also known as: markov chain · text generator · nlp
seeded · synthetic data
Presets
Output
About this tool, tips & examples
What it does
The Markov Text Generator builds an order-n Markov chain from any corpus you paste, then generates new text that statistically resembles it. Set the order (1–3) to trade randomness against coherence, choose the output length up to 500 words, and generate up to 10 variants per run — all seeded, so an amusing result is never lost.
Common use cases
- Creative writing — feed it your draft or a favorite author and mine the output for unexpected phrases.
- Style parody — corpus in, pastiche out: the classic toy that teaches how predictive text works.
- Placeholder prose with flavor — filler that sounds like your product, not lorem ipsum.
- Teaching NLP — the clearest possible demonstration of n-gram language models, decades before transformers.
Settings
- Corpus Text — the source text the chain learns from; more text gives richer output.
- Markov Order — 1 = word salad, 2 = the sweet spot, 3 = coherent but prone to quoting the corpus verbatim (presets for each).
- Output Length — 1 to 500 words per variant.
- How many — up to 10 variants per run.
- Seed — the same seed, corpus, and settings regenerate the identical text.
Privacy note
The chain is built and sampled locally in your browser — your corpus is never uploaded. Output is synthetic text derived statistically from your input; if the corpus is someone else’s writing, the usual copyright courtesy applies to what you do with the results.
FAQ
How does the order parameter work? Order n means the next word is chosen based on the previous n words. Higher order copies longer runs from the corpus — more grammatical, less original.
Why does my output repeat the corpus? Small corpus + high order = few choices per step. Add more source text or drop to order 2.
Is this AI? It’s the honorable ancestor: a pure statistical n-gram model, computable by hand, no neural networks involved. That’s what makes it a great teaching tool.