Text tools

Reverse Lines

Reverse the Order of Lines

Flip the order of lines so the last line comes first, without sorting them.

About this tool

About Reverse Lines

Some text arrives upside down in time: log files and chat exports put the newest entry last when you want it first, a timeline was written newest first but you need it in chronological order, or a numbered list was built backwards. Paste the lines and their order is flipped exactly, so the last line becomes the first, without sorting or otherwise changing anything. The text of each line stays as it was, including capitals and punctuation. Empty lines are removed by default, which is usually what you want for lists; untick Remove empty lines to keep blank lines in their mirrored positions, for example between blocks of a log, and untick Trim spaces to preserve indentation. You can also remove duplicate lines in the same pass. If you need the characters within each line reversed rather than the order of the lines, use Reverse Text instead. Copy the result or download it as a text file; nothing is uploaded.

Built and maintained by Abhi JainUpdated

How to Reverse Lines

  1. 1

    Paste the lines

    Paste your list or text into the Lines box.

  2. 2

    Keep Reverse order

    Reverse order is selected. Untick Remove empty lines or Trim spaces to keep blank lines and indentation.

  3. 3

    Copy

    Copy or Download the reversed lines.

Reverse Lines: questions and answers

Does reversing also sort the lines?

No. The lines keep their content and relative positions are simply mirrored. To sort Z to A, choose A–Z with the Z → A direction.

How do I reverse the text on each line?

Use Reverse Text, which writes characters or words backwards instead of changing the order of lines.

Can I reverse paragraphs instead of lines?

Join each paragraph onto one line first with Remove Line Breaks, reverse here, then add blank lines back with Find and Replace if needed.

Is there a size limit?

There is no fixed limit; very large lists depend on your device's memory. Tens of thousands of lines are no problem on a typical computer.