onlinerandomtools logo

Text lines shuffler

World's simplest randomization tool

Free online text line shuffler. Just load your multi-line data and get its lines rearranged in random order. There are no ads, popups or nonsense, just a random line mixer. Load your lines – get shuffled lines. Created by developers from team Browserling.
announcement check out our new project!
We just created something new for all science fans – SCIURLS – a neat science news aggragator. Check it out!
Line Grouping
Enter the number of lines you want to glue together while shuffling.
Line Trimming
Remove whitespace from both sides of a line.
Empty and Duplicate Lines
Remove lines with no characters.
Remove lines that appear more than once.
Text lines shuffler tool What is a text lines shuffler?
This tool rearranges the order of lines in the given textual data. It uses the Knuth method to do it, aka the Fisher and Yates order permutation algorithm. The behavior of the algorithm changes based on how many lines are shuffled at the same time. By default, it takes every single line in turn (1, 2, 3, …, n), generates a random number from 1 to n for it, which is the new position, and moves the line to this new place. It can also take several lines at once and move them together without splitting them apart. For example, if you enter the number 2 in the group size option, it will glue the 1st and 2nd lines together and move them together to a new position, then it will take the 3rd and 4th lines together, then the 5th and 6th, and so on. This way, you can shuffle any number of lines and preserve their relative positions. If the "Trim Lines" option is active, the utility removes trailing and leading whitespace in each line before shuffling them. If any of the lines are empty, the program can quickly delete it if the option "Skip Empty Lines" is enabled. Another option that can be useful is "Skip Duplicate Lines". It checks if the current line was already seen in the text before and if so, the application deletes this duplicate. Simple and easy!
Text lines shuffler examples Click to use
List of Superheroes
This example does a random permutation of rows in a list of superheroes. It randomly assigns a new position to each row and removes several empty lines so that there is no extra space in the output.
Superman Batman Spider-Man Hal Jordan Thor Captain America Martian Manhunter Iron Man Wonder Woman Aquaman
Wonder Woman Hal Jordan Thor Aquaman Iron Man Superman Spider-Man Martian Manhunter Captain America Batman
Required options
These options will be used automatically if you select this example.
Enter the number of lines you want to glue together while shuffling.
Remove whitespace from both sides of a line.
Remove lines with no characters.
Remove lines that appear more than once.
Malala Yousafzai Quote
In this example, we split six lines of a Malala Yousafzai quote into three groups (two lines per group) and shuffle them. Each pair of lines, namely the 1st and 2nd, the 3rd and 4th, and the 5th and 6th remain glued together even after shuffling. We also activate the "Trim Lines" option to get rid of whitespace on the right and left sides of the text on each line.
one child one teacher one book one pen can change the world © Malala Yousafzai
can change the world © Malala Yousafzai one book one pen one child one teacher
Required options
These options will be used automatically if you select this example.
Enter the number of lines you want to glue together while shuffling.
Remove whitespace from both sides of a line.
Remove lines with no characters.
Remove lines that appear more than once.
Visual Arts Styles
This example takes a sequence of drawing styles as input. Unfortunately, there are several repeated lines in the input that we'd like to delete. In order to shuffle the styles and also erase extra copies, we have enabled the "Skip Duplicate Lines" option.
Portrait Still life Still life Landscape painting Military art Portrait History painting Marine art Self-portrait Marine art Architectural style
Architectural style Self-portrait Marine art Still life Landscape painting Military art Portrait History painting
Required options
These options will be used automatically if you select this example.
Enter the number of lines you want to glue together while shuffling.
Remove whitespace from both sides of a line.
Remove lines with no characters.
Remove lines that appear more than once.
Pro tips Master online randomization tools
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlinerandomtools.com/shuffle-lines?input=Superman%0ABatman%0A%0ASpider-Man%0AHal%20Jordan%0AThor%0A%0ACaptain%20America%0AMartian%20Manhunter%0A%0AIron%20Man%0AWonder%20Woman%0AAquaman&shuffle-group-size=1&trim-lines=false&skip-empty-lines=true&skip-duplicates=false
All randomization tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Randomly rearrange the letters in a string, sentence, or text.
Randomly shuffle the order of all words in the input data.
Randomly shuffle text lines and rearrange their order.
Randomly shuffle paragraphs and change their order.
Randomly pick an item from many items.
Quickly generate random passwords.
Quickly generate random numbers.
Quickly generate random bitmap images.
Quickly generate random strings.
Quickly generate random data that matches the given regular expression.
Quickly generate random integers.
Quickly generate random fractions.
Quickly generate a sequence of increasing or decreasing random integers.
Quickly generate random primes.
Quickly generate random binary numbers.
Quickly generate random octal numbers.
Quickly generate random decimal numbers.
Quickly generate random hexadecimal numbers.
Quickly generate random bytes.
Quickly generate random calendar dates.
Quickly generate random clock times.
Quickly generate random IPs.
Quickly generate random MAC addresses.
Quickly generate random UUIDs.
Quickly generate random GUIDs.
Quickly generate random JSON data structures.
Quickly generate random XML documents.
Quickly generate random CSV files.
Quickly generate random TSV files.
Coming soon These randomization tools are on the way
Generate Random Digits
Generate a list of random digits.
Generate Random YAML
Generate random YAML markup.
Generate Random Pin Numbers
Generate a random pin number of any length.
Generate Random HTML
Generate random HTML code and HTML web pages.
Generate Random Text Files
Generate random plain text files.
Generate Random Binary Files
Generate random binary files.
Generate Random UTF8
Generate random UTF8 characters.
Generate Random Unicode Text
Generate a random Unicode string.
Generate Random HTML Tables
Generate random HTML tables with random values.
Generate Random LaTeX
Generate random LaTeX documents.
Choose a Random Image
Given a bunch of images, pick an image at random.
Generate Random Images
Generate random PNG/GIF/JPG/WEBP/BMP images.
Generate Random Audio
Generate random MP3 and WAV music files.
Generate Random Video
Generate random MP4 and AVI videos.
Generate Random Excel
Generate random Excel spreadsheets.
Generate Random RegExps
Generate random valid regular expressions.
Generate Random Words
Generate random English words.
Generate Random Sentences
Generate random English sentences.
Generate Random Locations
Generate random geographic places.
Generate Random Names
Generate random male and female names.
Generate Random Geographic Coordinates
Generate random latitudes and longitudes.
Generate Random URLs
Generate random web URLs.
Generate Random Emails
Generate random email addresses.
Generate Random Letters
Generate random alphabet letters.
Generate Random Colors
Generate a random set of colors.
Generate Random XY Coordinates
Generate random two dimensional (x, y) coordinates.
Generate Random XYZ Coordinates
Generate random three dimensional (x, y, z) coordinates.
Generate Random Vectors
Generate random mathematical vectors.
Generate Random Matrices
Generate random mathematical vectors.
Generate Random MD5 Hash
Generate random MD5 hash digests.
Generate Random SHA1 Hash
Generate random SHA1 hash digests.
Generate Random SHA2 Hash
Generate random SHA2 hash digests.
Generate Random URL-encoded data
Generate random percent-escaped URL data.
Generate Random Base64-encoded data
Generate random base64 data.
Randomize Character Case
Randomly change character case in text.
Shuffle Sentences
Randomly shuffle the order of sentences in text.
Shuffle Text Columns
Randomly change the order of columns in text.