Markov Chain Text Generator
Build a Markov chain from any text and generate new text at word or character level, with a measurement of how much is copied verbatim as the order rises.
Last reviewed by the Radiatus Cloud team
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
Order trades novelty against coherence, and the trade is sharp
A first-order word chain picks each word from those that followed the previous one, producing text that is locally grammatical and globally nonsense. A third-order chain looks at three words and produces something much more coherent, because there are far fewer continuations to choose from. Push it further and most contexts appear exactly once in the source, so the only continuation is the original one and the model reproduces its input verbatim. There is no order that is both novel and coherent, and this is the clearest possible demonstration of why.
Measuring the copying is what makes the trade visible
Generated text can look impressive while being a slightly reshuffled copy of the source. Comparing the output against the input and reporting the longest verbatim run, and the proportion of the output that appears contiguously in the source, turns an impression into a number. A model that copies eighty percent of its output is not generating, and the only way to know is to check.
This is the ancestor of a language model, and the difference is generalisation
A Markov chain and a neural language model both predict the next token from context. The chain stores every context it saw and cannot handle one it did not; the network learns a compressed representation and can respond to novel contexts. That difference is why the chain needs exponentially more data as the order rises while the network does not, and it is the whole reason the field moved on.
Related tools
- Data Collection Analysis — Analyze app description to infer data collection.
- Dark Pattern Detector — Scan UX text for manipulative patterns.
- AI Risk Disclosure — Generate disclosure text for AI features.
- Maturity Radar — Generate a radar chart of security maturity.
Frequently Asked Questions
What does order mean?
How many previous tokens the model looks at. Order one uses the last word, order three uses the last three, and higher orders give more coherent but less original text.
Why does high order just copy the input?
Because most long contexts appear exactly once in the source, so there is only one possible continuation. The model has nothing to choose between and reproduces the original.
Should I use words or characters?
Words give grammatical output quickly; characters need more data and higher orders but can invent plausible new words. Character level is more interesting on small inputs.
How much text do I need?
More than you expect, and exponentially more as order rises. A few thousand words supports order two comfortably and order four barely.
How is this different from a language model?
A chain memorises every context it saw and fails on any it did not. A network learns a compressed representation that generalises to unseen contexts, which is why it needs far less data per unit of coherence.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Paste some text and generate from it.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.