TextyConverterbeta
⌘K

Reverse Line Order

Reverse the order of lines in your text — last line becomes first. Browser-only.

0 characters
0 characters

About Reverse Line Order

This tool reverses the order of lines in your input — the last line moves to the top and the first line moves to the bottom. The characters inside each line stay exactly as they are. It's the equivalent of the Unix `tac` command.

When to use it

  • Showing a chronological log in newest-first order
  • Reversing a sorted list without re-sorting
  • Producing bottom-up output from top-down data
  • Quick view of a file from the bottom

How it works

Lines are split on LF/CRLF, the array is reversed, and the result is joined back with LF.

Examples

first
second
third
third
second
first

Frequently asked questions

Does it reverse the characters within each line?
No. Only the order of lines changes. To reverse characters per line, use reverse-each-line.
Are blank lines preserved?
Yes. Empty lines keep their position relative to non-empty ones, just in reverse.

Related tools