Reverse Lines Online · Flip Line Order | DedupeLines
DedupeLines
Free · No signup Browser-local · zero upload · flip 100K lines instantly

Reverse lines, online

Paste a list, get it back upside-down. Useful for log review, reading commit history newest-on-top, or any time a file landed in the wrong direction.

Input · 0 lines
output · 0 lines
Paste something on the left — results stream in here.

Or press Ctrl+Enter

Input lines 0
Blank lines 0
Output lines0

When to use this tool

guide
01 / Log review

Some tools dump logs oldest-first. Flip them so the latest entry is the first thing you read — no chronological detective work.

02 / Commit / changelog

Got a git log or release notes in oldest-first order? Reverse it in two seconds, paste it back where you need newest-first.

03 / List reordering

Survey responses, todo lists, ranked picks — sometimes "bottom up" is the right read. Flip and go.

04 / Cleanup workflows

Modeling a queue or stack? Pair reverse with the home-page dedupe to keep the last occurrence of each line instead of the first.

How it works

three steps
  1. 01

    Paste your list or upload a .txt

    Same threshold as the other tools — 100K lines live, larger files go to download mode automatically.

  2. 02

    Choose your toggles

    Trim removes leading/trailing whitespace on every line before flipping. Empty-line removal drops blank rows so the flipped output starts on a real line.

  3. 03

    Hit Run

    The last input line becomes the first output line. Order reversal is deterministic — same input always produces the same flipped output.

Under the hood

engine notes
Algorithm
Native Array.prototype.reverse() in place

O(n) single pass after optional trim/empty filtering. No sort, no comparison — deterministic flip.

Throughput
100K lines reversed in ≈80 ms on a 2024 M3 MacBook Air

Dominant cost is the line-split, not the reversal itself. 80 MB hard cap per run.

Threading
Web Worker for files ≥ 2 MB or ≥ 100K lines

Same Worker plumbing as the other tools; the reverse mode is one branch inside the shared engine.

Privacy & limits

what stays where

Everything runs in your browser. Your text is never uploaded; the reversal happens against an array in memory, with no network round-trip in between. After page load, the tool works offline. 80 MB hard cap per run.

Frequently asked

answered

How is this different from sorting in descending order?

Sorting compares values; reversal flips the existing order. If your input is "apple", "banana", "cherry", reverse gives "cherry", "banana", "apple" — but if the input is "banana", "apple", "cherry", reverse gives "cherry", "apple", "banana" (not the descending sort).

Why not just use `tac` or `tail -r` on the command line?

You can — and if you live in a terminal, `tac file.txt` on Linux or `tail -r file.txt` on macOS is faster. This tool is for the 95% of people who don't open a terminal: paste, click, get the flipped list.

Does it preserve blank lines?

By default, blank lines come along for the ride and end up at the top of the flipped output. Toggle "remove blank lines" on if you want them stripped before flipping.

Is my data uploaded anywhere?

No. All processing runs locally in your browser tab. There is no server-side step; the page works offline after loading.