How to Write Text Backwards: Reversing Text Letter by Letter and Palindromes
Updated: November 6, 2026 · AracMerkezi
Backwards text is what you get when a text’s characters are arranged from end to start. When the word “Merhaba” is written backwards, it becomes “abahreM” (the capital M is now at the end). It is often used in social media bios, puzzles, programming exercises and playful posts. This guide shows, step by step, the three different meanings of reversing, code examples, Turkish letter and emoji pitfalls, and palindrome checking.
How do you write text backwards?
It can be done in one of three ways:
- By hand: You read the text from end to start and write it down. It is easy with short words and very easy to get wrong with long texts.
- With a tool: You paste the text into the Text Reverser; the result appears reversed character by character.
- With code: A few characters of an expression are enough in a programming language (see below).
Examples
Capital letters do not stay in place; they travel with their letter, so in backwards text a capital can appear at the end:
| Text | Reversed letter by letter | Word order reversed |
|---|---|---|
| abc | cba | abc |
| Ankara | araknA | Ankara |
| Bugün hava güzel | lezüg avah nüguB | güzel hava Bugün |
| İyi günler | relnüg iyİ | günler İyi |
| Elif Kaya | ayaK filE | Kaya Elif |
Three different kinds of “reversing”
- Letter by letter: The character order is completely reversed (“İyi günler” → “relnüg iyİ”).
- Word order reversed: The words swap places but each word stays as it is (“İyi günler” → “günler İyi”).
- Each word reversed within itself: The order of words stays the same, and the letters of each are reversed (“İyi günler” → “iyİ relnüg”).
The tool on our site applies the first method. To change word order, you can reorder the words by hand or with code.
Reversing with code
We ran and tested the following expressions:
- JavaScript:
[...s].reverse().join(''); givesaraknAfor “Ankara”. For word order, uses.split(' ').reverse().join(' '); for “Bugün hava güzel” it givesgüzel hava Bugün. - Python:
s[::-1]; givesabahreMfor “Merhaba”. For word order,' '.join(s.split()[::-1]).
Caution: the form s.split('').reverse().join('') works on simple text but breaks on text containing emoji; for “😀 Ankara” the result contains invalid characters because the two halves of the emoji end up in reverse order. [...s], on the other hand, splits the text by character (code point) and keeps the emoji intact.
Turkish letters and emoji pitfalls
- Combining characters: “ğ” can be written as a single character, or as “g” followed by a separate breve mark (U+0306). In the second form, reversing throws the mark in front of the letter and the mark attaches to the wrong letter. Converting the text beforehand to the composed form with
normalize('NFC')prevents this. - Emoji: A family emoji such as “👨👩👧” consists of 8 code units and 5 code points in JavaScript (three people and two joiners). Reversing by character can shatter this emoji and turn it into a different sequence.
- Upper/lower case: Lowercasing “İ” needs Turkish rules:
'İ'.toLowerCase()gives a two-character result in JavaScript. If you will convert case after reversing, usetoLocaleLowerCase('tr').
What is a palindrome?
Words that read the same from left and right are called palindromes: “kayak”, “ana”, “radar”. There are sentence palindromes too: “Ey Edip Adana’da pide ye” and “Anastas mum satsana”. Three steps to check:
- Convert the text to lowercase (with Turkish rules).
- Remove spaces, punctuation and apostrophes.
- Compare the result with its reverse.
After step 2, the sentence “Ey Edip Adana’da pide ye” becomes eyedipadanadapideye; it is 19 letters and equals its reverse, so it is a palindrome. “Anastas mum satsana” → anastasmumsatsana (17 letters) is the same too. “Merhaba”, on the other hand, is not a palindrome because its reverse is “abahrem”. In code, the same check is done in Python with t == t[::-1].
Reversing numbers and number palindromes
Numbers can be reversed as well: 1234 → 4321. Trailing zeros move to the front when reversed and disappear when read as a number: 1200 → “0021” → 21. There are number palindromes too: 121, 1331, 12321. Single-digit numbers are their own reverse; there are 9 two-digit palindromes, 11, 22, ... 99; and the three-digit ones number 9 × 10 = 90, since the first digit has 9 options (1–9) and the middle digit has 10 (0–9) (we confirmed this by scanning 100–999).
Small exercises
Reversing does not change the length: “Bugün hava güzel” is 16 characters and its reverse is also 16 characters (spaces included). Try these:
- Write the word “kitap” backwards: you get patik; another pair whose reverse is also meaningful is “ray” and “yar”.
- The letter-by-letter reverse of “Merhaba Dünya” is aynüD abahreM (13 characters).
- The reverse of “yaprak” is “karpay” and it is not a palindrome.
The word count does not change either when you reverse the word order: “Bugün hava güzel” is 3 words in both directions. You can check your results against the tool’s output. Exercises like this are fun and also show you that reversing moves every character from its place one by one.
Uses
- Playful posts and profile texts
- Puzzles and children’s games
- String-reversal exercises and interview questions in programming courses
- Generating edge cases in text-processing tests
Common mistakes
- Mistaking letter-by-letter reversal for reversing word order (or the other way around).
- Not cleaning spaces and punctuation in a palindrome check; “Ey Edip Adana’da pide ye” is not a palindrome in its raw form.
- Reversing emoji text with
split('')and producing broken characters. - Reversing a number and forgetting that trailing zeros will vanish.
- Thinking backwards text provides privacy.
Caution
Emoji and some combining characters can consist of more than one code piece; reversing can give unexpected results. Backwards text is not an encryption method and must not be used for security; for an example with shifted letters, see the ROT13 and Caesar cipher guide.
Try the Text Reverser. To see your text’s length, use the Word Counter; for broader information, see the guide How to Count Words and Characters.
Frequently asked questions
How do you write text backwards?
You write the text character by character from end to start; the tool does it instantly. In programming, JavaScript uses [...s].reverse().join('') and Python uses s[::-1].
What is a palindrome?
A word that reads the same from left and right, such as kayak and radar. For sentences, the check is done after removing spaces and punctuation.
Is backwards text encryption?
No; it provides no security and is only for fun and practice.
Tools mentioned in this guide
More guides
- How to Count Words and Characters: A Guide for Homework, Articles and Social Media – How do you count words and characters, with or without spaces, and find reading time? Examples covering emoji, hyphens and limit traps.
- How to Calculate Reading Speed and Reading Time: Estimating Time From Word Count – How is reading time calculated? The 200 words per minute assumption, speaking speed, blog, assignment and presentation examples, and common mistakes.
- How Do You Read Morse Code? Letter and Number Chart, the SOS Signal – What is Morse code, and how are dot and dash durations counted? A to Z letter chart, 0-9 number chart, the SOS signal, and tips for translating Morse.
- What Are Meta Tags and Open Graph? Title, Description, Canonical, and Share Image – What are the title, meta description, canonical, robots meta, Open Graph, and Twitter Card tags? Recommended lengths, example code, and common mistakes.
- How to Remove Extra Spaces and Line Breaks: A Text Cleanup Guide – How to remove double spaces, blank lines and line breaks: Word, Excel and Notepad++ methods, fixes for text copied from PDFs, and one-step tool cleanup.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.