Reverse Lines
Flip the order of lines in a list from bottom to top.
Was this tool helpful?
Thanks for the feedback!
Reverse Lines flips the order of the lines in your text so the last line becomes the first and the first becomes the last. The content of each line is not touched: words and letters stay in their normal order, only the position of whole lines changes.
What the tool does to each line
The text is split at every line break, the list of lines is reversed, and the lines are joined back together with line breaks. That has a few practical consequences:
- Blank lines are kept and move along with everything else, so paragraph gaps end up in mirrored positions.
- A trailing line break becomes a leading one: if your text ended with a line break, the result starts with an empty line. Delete it or run the output through Remove Empty Lines.
- Indentation and spacing inside lines are preserved, so reversed code or nested lists keep their indents.
Example: turning a log from oldest-first to newest-first
2024-06-01 Server started 2024-06-02 Backup done 2024-06-03 Disk warning
becomes
2024-06-03 Disk warning 2024-06-02 Backup done 2024-06-01 Server started
The most recent event is now at the top, which is how most dashboards and feeds display activity.
When reversing line order is the right move
- Chat and email exports: WhatsApp exports and many ticket histories run oldest to newest; reversing them lets you read the latest messages first.
- Bank and wallet statements: transaction lines copied from a statement can be flipped to match the order of another report before comparing them.
- Countdown lists: a "top 10" written from 1 to 10 becomes a 10-to-1 countdown for a video script or presentation.
- Undoing an order: an A to Z list becomes Z to A, and a list sorted shortest-first with Sort Lines by Length becomes longest-first after one reversal.
- Proofreading: reading a document line by line from the bottom up breaks the flow of the argument, an old editor's trick for spotting typos and repeated words your eyes would otherwise skim past.
- Stacks and step lists: reversing installation steps gives a rough outline for an uninstall or rollback checklist, which you then edit.
Reverse lines, words or characters?
Three related tools do different jobs, and it is easy to pick the wrong one:
| Tool | Input one two / three four |
|---|---|
| Reverse Lines | three four / one two |
| Reverse Words | four three two one on a single line |
| Text Reverser | ruof eerht / owt eno |
If you need words mirrored within a sentence, use Reverse Words; for mirror-writing each character, use the Text Reverser. Reverse Lines never sorts anything: it only mirrors the order you already have, so for alphabetical order sort first and then reverse if needed.