Reverse Lines — Free Online Tool
Last updated: January 2025
What is Reverse Lines?
Reverse Lines flips the order of all lines in your text — the last line becomes first, and the first becomes last.
When to use Reverse Lines?
Use it to flip log file order (oldest to newest / newest to oldest), reverse sorted lists, and invert any line-based content.
How to use this tool
- 1Paste your text with multiple lines
- 2Click 'Reverse Lines'
- 3Copy the line-reversed output
Examples
| Input | Output |
|---|---|
| line 1 line 2 line 3 | line 3 line 2 line 1 |
| a b c d | d c b a |
| (Newest-first log → oldest-first) | Reversed line order |
| (1-10 numbered list) | 10-1 reversed list |
| (Alphabetical list) | Reverse-alphabetical result |
Rules & Behavior
- All lines are reversed in order
- Line content is not modified
- Empty lines are included in the reversal
Related Tools
Frequently Asked Questions
What does reversing lines do?
It takes your text and puts the last line first, the second-to-last line second, and so on, until the first line is at the bottom.
How is this different from backwards text?
Backwards text reverses the characters within each line. Reverse Lines reverses the order of lines while keeping each line's content intact.
Can I reverse a numbered list?
Yes, but the numbers in the content won't change — only the order of lines is reversed. You may need to re-number after reversing.
Is this good for log files?
Yes! If your log file shows oldest entries first and you want newest first, reverse lines to flip the order.
Does it preserve blank lines?
Yes, blank lines are included in the reversal and their position relative to other lines changes accordingly.