Flip a list upside down
Paste a list with one item per line and the order is reversed: the last line comes first and the first line comes last. The lines themselves are not changed.
First Fourth
Second => Third
Third Second
Fourth First
When it helps
- Log files and exports that list the oldest entry first, when you want the newest at the top.
- Ranked lists that are written from the bottom to the top, such as a countdown.
- Chat logs and notes that were saved in the wrong order.
- Preparing data before you sort, remove duplicates or load it into a spreadsheet.
Options
- Trim spaces: removes spaces from the start and end of every line.
- Remove empty lines: drops blank lines, so the result is a clean list.
The second mode, Reverse the letters in each line, keeps the lines in their order and writes each line backwards.
In the command line
tac file.txt # reverse the order of the lines (Linux)
rev file.txt # reverse the letters in each line (Linux)
sort -r file.txt # sort in reverse alphabetical order, which is different
Reversing the lines is not the same as sorting in reverse. A reverse sort puts the lines in Z to A order, while reversing only flips the order that they already have. To sort, use sort lines.
For the order of words, see reverse words, and for random order, shuffle lines. The reverse text page has every mode in one place.