Passer au contenu principal

Inverser le texte

Reverse text tools flip your text character-by-character, word-by-word, or line-by-line. While it sounds trivial, Unicode-aware text reversal is non-trivial — multi-byte characters, emoji, and combining diacritics must be handled correctly. Our tool reverses text correctly for all scripts and Unicode.

Texte original

Texte inversé

Modes d'inversion

Inverser les caractères

Inverse chaque caractère du texte. "Hello" devient "olleH".

Inverser les mots

Inverse l'ordre des mots. "Hello World" devient "World Hello".

Inverser les lignes

Inverse l'ordre des lignes. La dernière ligne devient la première.

Partager cet outil
Text Tools

À propos de Reverse Text Generator

Reverse text tools flip your text character-by-character, word-by-word, or line-by-line. While it sounds trivial, Unicode-aware text reversal is non-trivial — multi-byte characters, emoji, and combining diacritics must be handled correctly. Our tool reverses text correctly for all scripts and Unicode.

Comment l'utiliser

  1. Enter any text.
  2. Choose reverse mode: reverse characters, reverse words (keep word order reversed), or reverse lines.
  3. See the reversed output instantly.
  4. Copy with one click.

Formule et méthodologie

Character reversal: split string into Unicode grapheme clusters (not code points — emoji like flags are multiple code points), reverse the array, rejoin. Word reversal: split on whitespace, reverse word array. Line reversal: split on \n, reverse line array. Naive JS string[...str].reverse() fails for surrogate pairs (emoji); use Intl.Segmenter or a Unicode library.

Cas d'usage courants

  • Fun: creating mirror text for social media bios
  • Word puzzles: palindrome checking and construction
  • Steganography: hiding messages in reversed text
  • Typography: right-to-left language experiments
  • Programming: testing string manipulation code with expected outputs

Questions fréquentes

Emoji (and many special characters) are represented in UTF-16 as surrogate pairs — two 16-bit code units that together form one character. Simple array reversal reverses the code units, separating the pair and producing garbled output. Correct reversal must work at the grapheme cluster level: compound emoji like flags (🇺🇸 = two code points), skin tone modifiers, and ZWJ sequences must be treated as atomic units.
A palindrome reads the same forwards and backwards: "racecar", "level", "madam". The longest English palindromes are sentences or phrases: "A man, a plan, a canal: Panama" (ignoring punctuation and spaces). In programming, palindrome detection is a classic interview question solved by comparing the string to its reverse, or using two-pointer convergence. Our reverse tool makes palindrome checking easy.

Outils connexes

Tous les outils →

Intégrer cet outil sur votre site

Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.