Skip to content
100% local

Reverse line numbers

Prefix each line with a descending number, counting down to 1.

Input
Output

Reverse line numbers

Paste a list of lines and this tool prefixes each one with a descending number: the first line gets the total line count, and the count ticks down until the last line gets 1. It's the mirror image of ordinary line numbering — instead of counting up from the top, it counts down toward the end, like a countdown.

This layout suits ranked lists read top to bottom, where rank 1 belongs at the bottom or where you want the number to shrink as you approach a deadline or finish line — top-10 countdowns, race results listed by remaining position, checklists where the number represents "steps left" rather than "steps taken", or any list where a decreasing number carries more meaning than an increasing one.

The separator between the number and the line text defaults to ". " but you can change it to anything — a closing parenthesis, a colon, a tab, or nothing at all. Turn on "Pad with zeros" to left-pad every number to the width of the largest one, so a 12-line list produces 12, 11, … 02, 01 instead of mixing one- and two-digit numbers, which keeps the numbers aligned in a monospace view. "Don't number empty lines" leaves blank lines untouched and skips them when counting, so a list broken into visual groups by blank spacing doesn't waste a number on the gaps.

Everything runs locally in your browser: nothing you paste is uploaded, logged or sent anywhere. The tool handles Windows (CRLF) and Unix (LF) line endings the same way and copes with very long lists — tens of thousands of lines are numbered instantly. Copy the result, download it as a .txt file, or send it straight to another tool to continue formatting.

FAQ

What number does the first line get?
The total count of numbered lines. Numbering then counts down by one per line so the last line always gets 1.
Can I change what goes between the number and the text?
Yes. Edit the separator field — it defaults to ". " but accepts any string, including punctuation, a tab, or nothing.
What does "Pad with zeros" do?
It left-pads every number with zeros to match the width of the largest number, so a 12-line list numbers as 12, 11 … 02, 01 instead of mixing 1 and 2 digit numbers.
How are empty lines handled?
By default they get a number like any other line. Turn on "Don't number empty lines" to leave them blank and skip them entirely when counting.
Is my list uploaded anywhere?
No. Numbering happens entirely in your browser and your text never leaves your device.