iToolsPro

文本反转

反转字符 / 单词 / 行的排列顺序,一键倒序排列整段文本

反转设置
反转模式
提示:处理在本地完成,数据不会上传。emoji 等复合字符会被正确整体反转。
输入 / 结果
Chars · Words · Lines

文本反转,字符单词行都行

反转字符顺序、倒序单词或整行文本,多种模式一键切换,本地处理零上传。

100% 本地处理 · 数据不上传

核心特性

字符反转
hello → olleh,整段文本字符顺序倒排,emoji 等复合字符正确保留。
单词 / 行倒序
单词倒序、单词内字符反转、整行倒序,多种排版需求一次满足。
保留空白
单词反转时保留原有空格与换行结构,输出整洁可用。

适用场景

🧩 文字谜题 💻 代码整理 🪞 镜像排版 🔍 文本校验

文本反转工具指南Text Reverse Guide

了解四种反转模式与常见问题。Four reverse modes and answers to common questions.

功能说明What It Does

文本反转工具提供四种模式:字符反转(hello → olleh)、单词倒序(hello world → world hello)、单词内字符反转(hello world → olleh dlrow)、整行倒序(多行上下翻转)。

This tool offers four modes: reverse characters (hello → olleh), reverse word order (hello world → world hello), reverse characters within each word (hello world → olleh dlrow), and reverse line order.

全部在浏览器本地完成,数据不会上传。

Everything runs locally in your browser - nothing is uploaded.

保留空白Whitespace handling

单词类反转会保留原有空格与换行,避免排版错乱;emoji 等由代理对组成的字符会被当作整体反转,不会拆成乱码。

Word-level modes keep original spaces and line breaks so layout isn't broken; surrogate-pair characters like emoji are reversed as whole units instead of splitting into garbage.

使用步骤How to Use

  1. 选择反转模式。Choose a reverse mode.
  2. 粘贴文本。Paste your text.
  3. 点击「反转」并复制结果。Click "Reverse" and copy the result.

常见问题FAQ

Q1. emoji 会反转乱码吗?Q1. Will emoji get garbled when reversed?

不会,使用 Array.from 按 Unicode 码点切分,emoji 与中文等复合字符整体反转。No - it splits by Unicode code points with Array.from, so emoji and CJK characters stay intact.

Q2. 多空格会保留吗?Q2. Are multiple spaces kept?

会,单词反转时按空白分段并原样保留,双空格不会被压缩。Yes - words are split on whitespace and spacing is preserved, so double spaces stay intact.

Q3. 能否再反转回去?Q3. Can I reverse it back?

可以,对结果再执行同模式反转即可还原(字符反转可逆)。Yes - applying the same mode again restores the original, since character reversal is reversible.