Paste any multi-line text below to flip the order of its lines — the last line moves to the top and the first line moves to the bottom. Characters within each line are untouched.
Reversing lines means reordering a block of text so the last line appears first and the first line appears last. Each line's content is completely unchanged — only the sequence of lines is flipped.
Example input:
Line one
Line two
Line three
Line four
After reversing:
Line four
Line three
Line two
Line one
When checked (the default), any completely empty lines are removed before reversing. This is useful when pasting from sources that include trailing newlines or extra blank rows between entries. Uncheck it to preserve blank lines exactly as they appear.
Reversing log files — Application and server logs are written oldest-first. Reversing the lines puts the most recent entries at the top, which is usually what you want when debugging.
Flipping ordered lists — If you have a numbered or ranked list and want to present it in reverse order (countdown style, or lowest to highest instead of highest to lowest), this tool handles it instantly.
Reversing CSV or TSV data rows — Paste spreadsheet rows and get them back in reverse row order. Header rows will also flip — uncheck "strip blank lines" if your data has intentional blank row separators.
Undo a previous reversal — Reversing a reversed list restores the original order. If you've already flipped something and need to undo it, just paste the result back in.
Sorting workaround — Combined with other text tools, reversing lines is sometimes used as a step in manual data manipulation when a proper sort isn't available.
| Tool | What reverses | What stays the same |
|---|---|---|
| Reverse Lines (this tool) | Order of lines | Characters within each line |
| Reverse String | Every character in the text | Nothing — full reversal |
| Reverse Words | Word order | Letters within each word |
| Reverse Each Word | Letters within each word | Word order |
Does it preserve indentation and spacing within lines?
Yes — each line is treated as an opaque string. Spaces, tabs, and any other characters within a line are completely untouched.
What counts as a "blank line"?
A line is considered blank if it contains only whitespace (spaces, tabs) or nothing at all. With "Strip blank lines" checked, these are removed from the output.
Can I reverse lines in a CSV file?
Yes — paste the CSV content, reverse, and copy. Keep in mind the header row will move to the bottom. If you need the header to stay at the top, manually cut the first line out before pasting, then prepend it back after copying the result.
What is the line limit?
There is no hard limit — this tool runs entirely in your browser. Very large inputs (millions of characters) may slow down or freeze the page depending on your device.
This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.