Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

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"}'

Fields and responseOpenAPI documentGet an API key

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

  1. Type or paste your text into the input box.
  2. Choose what to reverse: characters, word order or line order.
  3. In character mode, tick Reverse each line separately to keep lines in place.
  4. Copy the reversed text.

Examples

Reverse characters

Input

Hello, world!

Output

!dlrow ,olleH
Reverse word order

Input

small tools big utility

Output

utility big tools small
Reverse line order

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.