Back to Tools

Reverse Line Order

Flip your list from bottom to top

0
0
0
Input Lines

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

  1. 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.
  2. 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.
  3. Press Reverse Order.
  4. 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

Everything happens with JavaScript inside the page, and the stats bar shows characters, words and lines for both versions.


Related Tools

Related Tools


Frequently Asked Questions

Does this reverse the letters in each line?
No. It only reverses the order of the lines. The first line becomes the last and so on, while each line's own words and characters stay exactly as you wrote them.
Why does an empty line appear at the top of my result?
If the input ends with a line break, the tool sees a final empty line, and reversing moves it to the top. Turn on the Skip blank checkbox before pressing Reverse Order and the empty entry is removed.
What does the Trim lines option do?
It removes leading and trailing spaces from every line before reversing. It is on by default. Turn it off if you need to keep indentation, for instance when you are reversing lines of code or an indented outline.
Can I upload a file instead of pasting?
Yes. Use the File button to pick a .txt file and its contents load into the input box. Other formats are not supported by the button, so for Word or PDF content copy the text and paste it in.
Will numbered lines be renumbered after reversing?
No. Any numbers that are part of the text move with their lines. A list numbered 1 to 5 will read 5 to 1 afterwards. If you need fresh numbering, strip the numbers first with a line-number remover and add them again.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.