Reverse Text, Words or Lines
Write text backwards, or flip word or line order.
Use via API
Reverse text by characters (keeping emoji and accents intact), by word order, or by line order. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/reverse-text
curl https://pithlab.com/api/v1/tools/reverse-text \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"Hello, world!","mode":"characters"}'About the Reverse Text
Reverse text backwards character by character, flip the order of words, or reverse the order of lines. Emoji and accented letters stay intact.
How to use the Reverse Text
- Type or paste your text into the input box.
- Choose what to reverse: characters, word order or line order.
- In character mode, tick Reverse each line separately to keep lines in place.
- Copy the reversed text.
Examples
Input
Hello, world!
Output
!dlrow ,olleH
Input
small tools big utility
Output
utility big tools small
Input
first second third
Output
third second first
Frequently asked questions
Why don't emoji break when reversed?
Text is split into characters as you see them (grapheme clusters) using Intl.Segmenter, so emoji with skin tones, flags and letters with combining accents are moved as a single unit instead of being split apart.
How does word reversal treat punctuation?
Words are split on whitespace, so punctuation stays attached to its word: "Hello, world!" becomes "world! Hello,". Each line is reversed separately and spacing is kept.
Is reversed text the same as mirrored text?
No. Reversing changes the order of characters but each letter still faces the normal way. True mirror writing needs special flipped characters or CSS.