Text line shuffler
World's simplest random toolFree online text line shuffler. Just load your multi-line data and get its lines rearranged in random order. Free, quick, and very powerful. Load your lines – get shuffled lines. Created by developers from team Browserling.
A link to this tool, including input, options and all chained tools.
Can't convert.
What is a text line shuffler?
learn more about this toolThis 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 line shuffler examples
Click to useList 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
Enter the number of lines you
want to glue together
while shuffling.
want to glue together
while shuffling.
Remove whitespace from
both sides of a line.
both sides of a line.
Remove lines with no
characters.
characters.
Remove lines that appear
more than once.
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
Enter the number of lines you
want to glue together
while shuffling.
want to glue together
while shuffling.
Remove whitespace from
both sides of a line.
both sides of a line.
Remove lines with no
characters.
characters.
Remove lines that appear
more than once.
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
Enter the number of lines you
want to glue together
while shuffling.
want to glue together
while shuffling.
Remove whitespace from
both sides of a line.
both sides of a line.
Remove lines with no
characters.
characters.
Remove lines that appear
more than once.
more than once.
Pro tips Master online random 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://onlinetools.com/random/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 random tools
Randomly rearrange the letters in a string, word, sentence, or text.
Randomly shuffle the order of all words in the input data.
Randomly shuffle text lines and rearrange their order.
Randomly shuffle sentences and change their order.
Randomly shuffle paragraphs and change their order.
Randomly pick an item from many items.
Quickly generate one or more random alphabet letters.
Quickly generate random passwords of arbitrary length.
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.
Generate a list of random digits from 0 to 9.
Generate a list of random digit pairs from 00 to 99.
Quickly randomly pick a digit from many digits.
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.
Quickly pick one or more winners from many participants.
Coming soon These random tools are on the way
Flip a Coin
Randomly flip a coin and generate a head or a tail.
Throw a Dice
Roll one or more dice and get random dice numbers.
Spin a Wheel
Spin a wheel to pick a name, number, or a winner.
Select a Card
Pick a random card from a deck.
Shuffle a Deck of Cards
Randomize the order of cards in a deck.
Generate Pairs of Random Numbers
Generate a list of pairs of random numbers.
Generate Random Bits
Generate a list of random binary bits (0 and 1).
Generate Random Relative Prime Numbers
Generate a list of random relative primes.
Generate Random YAML
Generate random YAML markup.
Generate Random BSON
Generate random BSON (Binary JSON) files.
Generate Random TOML
Generate random TOML configuration files.
Generate a Random List
Create a random list of various items.
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 Morse Code
Generate random Morse Code messages.
Generate Random UTF8
Generate random UTF8 characters.
Generate Random UTF16
Generate random UTF16 characters.
Generate Random UTF32
Generate random UTF32 characters.
Generate Random Unicode Text
Generate a random Unicode string.
Generate Random Emoticons
Generate a bunch of random emojis.
Generate Random Lenny Faces
Generate a bunch of random smiley faces.
Generate Random HTML Tables
Generate random HTML tables with random values.
Generate Random LaTeX
Generate random LaTeX documents.
Draw a Random Map
Generate a random map.
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 Word Documents
Generate random Word documents.
Generate Random RegExps
Generate random valid regular expressions.
Generate Random Words
Generate random English words.
Generate Random Sentences
Generate random English sentences.
Generate Random Paragraphs
Generate random pargraphs of text.
Generate Random Locations
Generate random geographic places.
Generate Random Streets
Generate a list of random streets.
Generate Random Cities
Generate a list of random cities.
Generate Random Countries
Generate a list of random countries.
Generate Random Planets
Generate a list of random planets.
Generate Random Names
Generate random male and female names.
Generate Random Usernames
Generate random usernames for social networks and forums.
Generate Random Cat Names
Generate random feline names.
Generate Random Dog Names
Generate random canine names.
Generate Random ISBNs
Generate random ISBN book identifier numbers.
Generate Random Geographic Coordinates
Generate random latitudes and longitudes.
Generate Random Phone Numbers
Generate random telephone numbers.
Generate Random URLs
Generate random web URLs.
Generate Random Emails
Generate random email addresses.
Generate Random Colors
Generate a random set of colors.
Generate Random XYZ Coordinates
Generate random three dimensional (x, y, z) coordinates.
Generate Random Polar Coordinates
Generate random polar (ρ, φ) coordinates.
Generate Random Cylindrical Coordinates
Generate random cylindrical (ρ, φ, z) coordinates.
Generate Random Points
Generate random n-dimensional points (x₁, x₂, x₃, x₄, …).
Generate Random Vectors
Generate random mathematical vectors.
Generate Random Matrices
Generate random mathematical vectors.
Generate Random Expressions
Generate random mathematical expressions.
Generate Random Equations
Generate random mathematical equations.
Generate Random Functions
Generate random mathematical functions.
Generate Random Surfaces
Generate random geometric surfaces.
Generate Random Shapes
Generate random geometric shapes.
Generate Random Lines
Generate a drawing of random lines.
Generate Random Squares
Generate a drawing of random squares.
Generate Random Circles
Generate a drawing of random circles.
Generate Random Sudoku Puzzles
Generate a sudoku puzzle.
Generate Random Crossword Puzzles
Generate a crossword puzzle.
Generate Random Chess Positions
Generate a chess board with a random game position.
Generate a Random Chess Game
Generate an animation with a random (valid) chess game.
Generate Random Draughts Positions
Generate a checkers board with a random game position.
Generate a Random Draughts Game
Generate an animation with a random (valid) checkers game.
Generate Random Go Positions
Generate a go board with a random game position.
Generate a Random Go Game
Generate an animation with a random (valid) go game.
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.
Generate Random User Agents
Generate random browser user agent strings.
Generate Random Cats
Create pictures of random cats.
Generate Random Dogs
Create pictures of random dogs.
Generate Random Birds
Create pictures of random birds.
Generate Random Trees
Create pictures of random trees.
Generate Random Flowers
Create pictures of random flowers.
Generate Random Faces
Create pictures of human faces.
Randomize Character Case
Randomly change character case in text.
Shuffle Text Columns
Randomly change the order of columns in text.
Subscribe! Never miss an update
Cool!
Notifications We'll let you know when we add this tool
Cool!
Feedback we'd love to hear from you!