Skip to content

Reverse Lines

Reverse the order of the lines of your text so that the last line comes first.

Line reverser
One item per line. The last line becomes the first.

Result
Reversed lines
four
three
two
one
4
Lines

Private: Everything runs in this page. Nothing you type is sent anywhere or saved.

On this page
  1. Reversed lines examples
  2. Formula
  3. How the line reverser works
  4. What this tool does not do
  5. Frequently asked questions
  6. Related tools

Reversed lines examples

LinesReversed
a, b, cc | b | a
1, 2, 3, 44 | 3 | 2 | 1
red, green, blue, yellowyellow | blue | green | red
xx
first, , lastlast | | first

Formula

new line k = old line (n + 1 - k), where n is the number of lines

How the line reverser works

  1. Step onePaste your list with one item on each line.
  2. Step twoTick the box if you want empty lines dropped before the list is reversed.
  3. Step threeCopy the reversed list from the box.

What this tool does not do

  • It reverses the order only; the letters inside each line stay as they are.
  • It does not sort the lines; use the sort tool for alphabetical order.
  • It splits on line breaks, so a very long paragraph without line breaks is one line.

Frequently asked questions

Does it reverse the letters in each line?

No. Only the order of the lines changes. Use the reverse text tool to flip the letters or the words.

What happens to empty lines?

They are kept and move with the rest, unless you tick the box that removes them first.

Does it change the case or spacing of lines?

No. Every line is kept exactly as it was.