Reverse Line Order
Flip your list from bottom to top
Turn a list upside down
Some lists are simply in the wrong direction: a log with the oldest entries at the top, a chat export that reads bottom to top, a queue you want to process from the end. Reversing the lines by hand means cutting and pasting row by row. This tool takes your text, splits it at every line break, and writes it back in the opposite order, so the last line becomes the first.
Step by step
- Type or paste your lines into the Input Lines box. You can also press File to load a .txt document, use Paste for clipboard text, or click Sample for five demo items.
- Choose your cleanup options: Trim lines (on by default) removes spaces at both ends of each line, and Skip blank (off by default) drops empty lines before reversing.
- Press Reverse Order.
- Check the Before and After counts, then choose Copy or .TXT to save reversed-lines.txt.
How the options change the result
The two checkboxes decide what counts as a line worth keeping. If your pasted text ends with a newline and Skip blank is off, that empty last line becomes the first line of the output, which surprises many people. Tick Skip blank when your data has stray gaps, or leave it off if the blank lines are meaningful separators, for example between groups of entries. Unticking Trim lines preserves leading indentation, which matters for code or indented outlines.
Practical uses
- Reading a log or transcript newest-first instead of oldest-first.
- Reversing a numbered countdown or a ranked list to show it from the bottom up.
- Flipping the order of paths, URLs or IDs before feeding them into another process.
- Reordering a bibliography or changelog that was pasted in ascending order.
Good to know
- Only the order of lines changes. The text inside each line is not reversed, so words stay readable.
- Multi-line entries such as paragraphs with soft wraps will be split apart, because every line break is treated as a boundary.
- Numbering inside the text is not updated. If your lines begin with 1, 2, 3, they will come out as 3, 2, 1 rather than being renumbered.
- The file loader reads plain text files only.
Everything happens with JavaScript inside the page, and the stats bar shows characters, words and lines for both versions.
Related Tools
Related Tools