Reverse Words Tool
Flip the word order of any text.
Result
How it is calculated
The tool trims the text and splits it at every run of whitespace (spaces, tabs and line breaks), reverses the list and joins it back with single spaces. A word is anything between whitespace, so punctuation stays attached to the word it touches: Hello, keeps its comma and moves with it. Letters inside a word are not changed, and capital letters stay where they are on each word. Because all whitespace becomes a single space, extra spaces and line breaks in the input are lost and the output is one line. Empty text, or text with only spaces, returns no result. This reverses word order only; it does not reverse the letters of each word.
Worked example
Take the sentence: Hello, world! How are you today? It splits into six pieces: Hello, / world! / How / are / you / today? The list is reversed to today? / you / are / How / world! / Hello, and joined with single spaces. The result is today? you are How world! Hello,. Notice that the question mark now sits in the middle of the line and the comma ends it, because punctuation travels with its word rather than staying at the end of the sentence.
Common mistakes
- Expecting the letters of each word to be reversed. This tool flips only the order of the words, so Hello stays Hello, not olleH.
- Expecting punctuation to stay at the end of the sentence. A full stop or question mark is attached to its word and moves with it.
- Pasting several lines and expecting the lines to stay separate. Line breaks count as spaces, so everything is merged into one reversed line.
- Expecting capital letters to be corrected. The first word of the original keeps its capital and ends up last, so the new first word may be lowercase.
- Relying on exact spacing. Double spaces and tabs are collapsed to single spaces, so the output does not preserve the original layout.
About this calculator
This tool reverses the order of words in a sentence while keeping each word itself intact, so "the quick brown fox" becomes "fox brown quick the." Unlike reversing individual characters, this operation works at the word level, splitting text on spaces, flipping the sequence, and rejoining it.
It's used for word-order puzzles and language games, for generating novelty or attention-grabbing social media text, and by writers and editors experimenting with sentence structure or checking how a phrase reads in reverse order for stylistic effect. Programmers also use a working reverse-words example as a quick reference or sanity check when implementing similar string-splitting and array-reversal logic in their own code.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool finds words by looking for whitespace, so it suits languages that put spaces between words. Text in Chinese or Japanese, which is usually written without spaces, comes back as one unbroken block and is therefore unchanged. The same applies to a long string with no gaps, such as a URL. Separately, the capital letter of the first word does not move with it. What other word-level transformation would you like to see, such as sorting or shuffling?