How to Reverse a List — Online, in Code and in Spreadsheets
Reversing a list flips the order of items so the last becomes first and the first becomes last. It is a simple operation that comes up more often than expected — reversing a timeline from oldest-first to newest-first, flipping a ranked list from bottom-to-top, reversing the output of a tool that delivers results in the wrong order, or simply checking what a list looks like in reverse.
Reverse any list instantly with our free Reverse List tool. For alphabetizing instead of reversing, use our List Alphabetizer. For randomising the order instead, use our List Randomizer. For reversing the letters within each word rather than the order of lines, use our Reverse Letters tool.
Reversing a List in Different Environments
Browser Tool
The fastest method for a one-off task — paste your list into the Reverse List tool, click reverse, copy the result. No software, no code, no spreadsheet required.
Excel
Excel has no built-in reverse function for lists. The standard workaround: add a helper column with sequential numbers (1, 2, 3...), then sort by that column in descending order. This reverses the list using the original row numbers as a sort key. Delete the helper column when done. Alternatively, use the formula approach: in cell B1 enter =INDEX($A$1:$A$10, ROWS($A$1:$A$10)+1-ROW(A1)) and fill down — this pulls items from column A in reverse order.
Google Sheets
Use the SORT function with a helper column: add numbers, sort descending. Or use the array formula approach: =SORT(A1:A10, ROW(A1:A10), -1) — this sorts by row number in descending order, effectively reversing the list.
Command Line
Unix/Linux/Mac: tac filename.txt reverses the line order (tac is cat backwards). On Mac where tac is not available: tail -r filename.txt achieves the same result. Windows: No built-in command. Use PowerShell: Get-Content file.txt | Sort-Object {[int]$_.ReadCount} -Descending (or pipe through a PowerShell reverse function).
Programming
Python: my_list[::-1] creates a reversed copy. list(reversed(my_list)) is equivalent. my_list.reverse() reverses in place. JavaScript: myArray.slice().reverse() creates a reversed copy (slice prevents modifying the original). myArray.reverse() reverses in place. Both in-place and copy versions are useful depending on whether you need the original order preserved.
Reverse any list instantly — paste your list and get it flipped in one click
Try Reverse List Free →
