1001Ferramentas
🔀 Text

Shuffle Text

Shuffle lines, words or characters of a text using a Fisher-Yates shuffle. Useful for raffles, tests and generating random samples. Everything in your browser.

Randomize a list without a spreadsheet

You have a list of 200 names and need a random order for an internal draw, or a set of questions that should not always run in the same sequence. In a spreadsheet that means RAND() plus a helper column; in Python, five lines and an import. Pasting the text and clicking shuffle handles the same job in two seconds with nothing to install.

The shuffle is Fisher-Yates: it walks the list backwards and swaps each item with one picked from the positions not yet locked in. That is the algorithm that yields a uniform permutation, unlike the old trick of sorting by a random number. Each mode splits differently: Lines breaks on newlines (a blank line counts as an item and can land mid-text), Words splits on any whitespace and returns a single line, Characters walks code points.

In Characters mode, emoji built from several code points, such as flags and family sequences, come apart into fragments. Plain text is unaffected. The randomness comes from Math.random, which is fine for tests and casual draws but not for prize draws or anything that has to be auditable — use a witnessed, logged process for those. Keep the original text, since a shuffle cannot be undone. Everything runs in your browser.

Frequently asked questions

Can I shuffle while keeping each line intact?
Yes, that is Lines mode. The order of the lines changes but the content of each one stays exactly as you pasted it.
Why does Words mode collapse everything onto one line?
It splits on any whitespace, newlines included, then joins the pieces with a single space. Shuffle by lines if you need paragraphs preserved.
Is the output genuinely random?
It is Fisher-Yates driven by Math.random: uniform enough for everyday use, but not a cryptographic generator. Official draws deserve an auditable method.

Related Tools