shuffle-words
A word shuffler randomises the order of words in a text using a uniform-random permutation algorithm (Fisher–Yates / Knuth shuffle). Practical applications include surrealist/found poetry, "exquisite corpse"-style writing games, language-learning vocabulary drills, prompts for creative writing, generating word-cloud input, and fairness/randomness demonstrations. The ZTools Shuffle Words tool uses crypto.getRandomValues() (when available) for cryptographically-strong randomness; otherwise falls back to Math.random(). Punctuation and case are preserved per word, so the output reads as recognisable words even when the order is meaningless.
Use cases
Surrealist / found poetry
Take a paragraph from a book, shuffle the words, see what unexpected meanings emerge. The Dadaists invented this in 1916; Tristan Tzara's "How to Make a Dadaist Poem" is the founding recipe.
Vocabulary learning drills
Shuffle the words in a target-language sentence and challenge yourself to reorder them correctly — tests both vocab and grammar simultaneously.
Creative writing prompts
Stuck? Shuffle a paragraph from a favourite author. The unfamiliar adjacency forces new connections in your brain.
Randomness demonstrations
Teaching probability or PRNG concepts: shuffle the same sentence repeatedly, observe how rarely you get the original back (≈ 1/n!).
How it works
- Paste text — Plain text. Multi-paragraph supported; choose to shuffle within each paragraph or across the entire input.
- Pick algorithm — Fisher–Yates (uniform random — default) or "weighted" (preserve some structure).
- Generate — Each shuffle produces a different result; click again for another permutation.
- Preserve options — Toggle: keep punctuation attached to words, preserve sentence-final period, lowercase all (or restore initial caps after shuffle).
Examples
Input: "The quick brown fox jumps over the lazy dog."
Output: "jumps fox lazy The dog quick over brown the." (one of 9! ≈ 362,880 possible permutations).
Input: Long paragraph, shuffle within each sentence
Output: Sentence boundaries preserved; only word order within each sentence randomised — more readable but still surreal.
Input: Same input run 5 times
Output: Five distinct permutations; probability of repeating one is vanishingly small at sentence length ≥ 7 words.
Frequently asked questions
How random is the shuffle?
Fisher–Yates with crypto.getRandomValues() gives a uniform random permutation indistinguishable from true randomness for practical purposes. Math.random() (fallback) is good enough for non-cryptographic use.
Why does my paragraph keep the period at the end?
Optional: "preserve sentence-final period" treats the trailing "." as attached to whatever word ends up last, so output still reads as a sentence. Disable to shuffle punctuation freely.
Can I shuffle while keeping noun-verb-noun structure?
No — that requires part-of-speech tagging beyond what the tool does. For structured shuffling, use a constrained-grammar generator like Tracery.
Does it preserve newlines?
Yes — paragraph boundaries are respected. Shuffle within paragraphs or across them; you choose.
Will the same text always give the same shuffle?
No — each click rerolls. If you need reproducibility, paste-shuffle-copy quickly; or use a seeded PRNG (not exposed in this tool).
How is this different from shuffle-letters?
Words shuffles whole tokens; letters shuffles individual characters. Wildly different output texture.
Tips
- For poetry, shuffle short paragraphs (3–5 sentences) — long inputs are too random to feel meaningful.
- Run multiple shuffles and pick the one that sparks an idea; rejection sampling beats accepting the first output.
- Pair with a grammar pass after editing to turn surrealist output into publishable verse.
- For language learning, target intermediate-difficulty sentences (10–15 words) — too short is trivial; too long is intractable.
- Combine with shuffle-lines for two-axis randomness.
Try it now
The full shuffle-words runs in your browser at https://ztools.zaions.com/shuffle-words — no signup, no upload, no data leaves your device.
Last updated: 2026-05-06 · Author: Ahsan Mahmood · Edit this page on GitHub