Alphabetical, natural (file2 before file10) or by length, any language
Reverse Lines
Flip a list or log so the last line comes first, or reverse words or characters.
Loading tool…
How to use reverse lines
Paste your text.
Choose line order, words in each line, or every character.
Copy or download the result.
What this tool does
- Reverses line order and keeps your line endings and final line break.
- Reverses the words on each line and keeps its indentation.
- Reverses characters by grapheme, so emoji, flags and accented letters are not broken apart.
How the result is verified
For line and character modes, the result is reversed again and compared with your text; they must match exactly.
Frequently asked questions
Will emoji survive reversing the characters?
Yes. Characters are reversed as whole graphemes, so a family emoji or a flag stays one symbol instead of turning into broken pieces.
Does it sort the lines?
No. It only flips the current order. To sort Z to A, use Sort lines with Reverse order on.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Random line order with a fair, crypto-random shuffle
Number lines with any start, step and format, or strip them
Flip the page order of a PDF, with an option to keep the cover first