How line reversal works
The input is split on \n or \r\n into an array of lines. That array is reversed, then rejoined with \n. Nothing inside a line is altered: words, spacing, capitalisation, and punctuation on each line are carried over exactly, only their top-to-bottom position changes.
This is different from reversing characters. Reversing characters turns abc into cba; this tool keeps each line readable and just plays the lines back in the opposite order. It is the quick way to turn an oldest-first log into newest-first, or to flip a ranked list end to end.
The optional Drop Blank toggle filters out lines that are empty or contain only whitespace before the reversal. With it off, a trailing newline in the input becomes a leading blank line in the output, which is expected but sometimes not what you want. Turn it on to keep the output tight.
How to use reverse line order
- 1Paste or type your lines into the input panel on the left.
- 2Read the reversed order in the output panel on the right.
- 3Turn on Drop Blank if empty lines should be removed before flipping.
- 4Copy the result with the Copy button, or download it as a text file.
- 5Run the tool again on the output to restore the original order.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Reverses line order, not characters
The last line moves to the top and the first line moves to the bottom. Each line keeps its exact content: this is a reordering of whole lines, not a character reversal. Applying the tool twice returns the original text.
Handles both line endings
Input is split on Unix \n and Windows \r\n line endings, so text pasted from any platform reverses correctly. Output is joined with \n.
Optional blank-line drop
With Drop Blank on, lines that are empty or whitespace-only are removed before the flip, so they do not float to the top of the result. With it off, every line including blanks is preserved and reversed.
Order-only, content-safe
No trimming, case changes, or deduping happen. A line that appears twice appears twice in the output. To also drop repeats, run remove duplicate lines first.
Linear single pass
Splitting, reversing, and joining each run once over the input, so even a large list flips in one pass. It recomputes on every keystroke in your browser, with nothing uploaded.
Worked example
The five lines are played back bottom to top. Each line keeps its own text; only the order changes.
one two three four five
five four three two one
Settings reference
| Setting or behaviour | Effect on output |
|---|---|
| Line order | Reversed: the last input line becomes the first output line. |
| Line content | Untouched. Each line keeps its exact characters and spacing. |
| Drop Blank (default off) | When on, empty and whitespace-only lines are removed before reversing. |
| Line endings | Input split on \n or \r\n; output joined with \n. |
| Running twice | Restores the original order, since reversal is its own inverse. |
FAQ
Does this reverse the letters in each line too?
abc into cba.