Reverse Lines

Paste text and get the same lines in the opposite order: the last line first, the first line last. Nothing inside a line changes.

How it works

The tool splits your text at each line break and puts the lines back in the opposite order. The characters inside each line are not reversed, and no line is sorted or changed.

Empty lines are lines too, so they move with the rest. A final line break at the end of the text stays at the end, rather than turning into an empty first line.

Running the result through again gives back the text you started with. Everything runs on this page.

How to use it

  1. 1 Paste your text into the Text box.
  2. 2 The reversed lines appear below as you type.
  3. 3 Copy the result, or download it as a .txt file.

Good to know

  • Many logs and chat exports are oldest first. Reversing puts the newest entry at the top.
  • To flip a sorted list, sort it first with Sort Lines, then reverse it here, or pick Z to A there.
  • Lines are reversed, not letters. "abc" stays "abc".
  • Paragraphs that wrap on screen are still one line each, so they move as one block.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Reading a chat export or a log from the newest line down

Most exports are written in the order things happened. A chat history starts with the first message and ends with the last. A server log starts at the first request of the day. A bank statement saved as text often lists the oldest payment first. When you want the most recent entries, you have to scroll to the bottom of a long file and read upwards.

Paste the text here and the order flips. A log of 5,000 lines comes back with line 5,000 at the top and line 1 at the bottom. Each line stays exactly as it was, timestamps and all, so you can read the newest entries first and stop once you reach the time you care about. The note under the result shows how many lines were reversed.

Reversing is not sorting. Z to A in the Sort Lines tool orders lines by their text, which for a log means by whatever the line happens to start with. Reverse keeps the order the lines were written in and turns it upside down. For a log whose lines start with a date in the form 2026-12-04 the two give the same result, but for a chat export that starts each line with a name, only reversing keeps the conversation in order.

There are smaller uses too. A numbered list of steps can be turned into a countdown. A list of song titles in the order they were added can be read from the latest addition. Code that undoes a list of changes often needs them in reverse order, and pasting the list here gives you that order to work from. Running the result through a second time gives back the original, which is an easy check.

The limits are simple. The tool works on lines, so a message that runs over several lines in a chat export is split, and its lines come out in reverse order too. It does not reverse the letters inside a line. It takes up to 1 MB of text at a time; split a bigger log into parts and reverse the parts in reverse order.

Frequently asked questions

Does this reverse the letters in each line?

No. Only the order of the lines changes. Each line keeps its text exactly.

Is reversing the same as sorting Z to A?

No. Reversing ignores what the lines say and just flips their order. Z to A sorts them by their text. A list that was in A to Z order gives the same result both ways.

What happens to empty lines?

They are reversed with everything else, so a gap between two lines stays between the same two lines.

How much text can I reverse?

Up to 1 MB at a time, which is tens of thousands of lines.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.