Skip to content

Reverse Lines

Flip a list upside down so the last line becomes the first.

Quick Tool Overview

Reverse Lines flips a list upside down so the last line becomes the first — the operation every log file eventually needs. Blank lines can be kept in place to preserve the document structure, and a group mode keeps multi-line records together while reversing the order of the records.

What it does
Reverses the order of lines in a text
You give it
A log, export, ranked list or any set of lines
You get back
The same lines, last to first
Best for
Reading logs newest first and flipping chronological exports
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Reverse Lines

Log files are written oldest first and read newest first, which is why every developer eventually wants a list turned upside down. The same is true of a chronological export you need in reverse, or a ranked list you want to read from the bottom.

This flips the line order in one pass. Blank lines can be kept in position — which keeps a structured document intact — or reversed along with everything else. There is also a reverse-in-groups mode for data where several lines form one record: reversing in blocks of three keeps each record together while flipping the order of the records themselves.

Key features of the Reverse Lines

Blank lines held in place

Keep the visual structure of a document intact while its content flips, instead of scattering the gaps.

Group mode for multi-line records

Set the lines per record and each record stays intact while their order reverses.

Every line ending handled

CRLF, LF and CR are normalised first, so a file from any system reverses correctly.

Trailing newline ignored

The empty line at the end of a file does not become a leading blank line at the top.

Download the result

Save the reversed list straight to a text file rather than copying it in pieces.

How to use the Reverse Lines

  1. 1

    Paste your list

    A log, an export, a ranked list or any set of lines.

  2. 2

    Choose how blanks are handled

    Reverse them with everything else, or leave them where they are to keep the document structure.

  3. 3

    Use group mode if records span lines

    Set a group size and the lines within each record stay together while the records flip.

  4. 4

    Copy or download

    Copy the reversed list, or save it as a text file.

Frequently asked questions

By default they are reversed along with everything else. Switch on "keep blank lines in place" and they stay at their original positions, which preserves the visual structure of a document while the content flips.

Reviews of the Reverse Lines

What people who use the Reverse Lines think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Reverse Lines. It takes half a minute and no account.

Write the first review

More text tools