Claude Code 文本格式化器

清理杂乱的终端与 Claude Code 输出,去除 ANSI 颜色码、行号与控制字符。

什么是 Claude Code 文本格式化器?

Claude Code 文本格式化器是一个专门用于清理 Claude Code 和终端输出文本的工具。当您从终端复制输出时,通常会包含 ANSI 转义码、行号和各种控制字符,这些在粘贴到文本编辑器时会显示为乱码。这个工具可以自动清理这些内容,提供干净的纯文本输出。

Everything runs locally in your browser. Your input never leaves your device, so the tool is safe for cleaning output that contains sensitive information.

如何使用

将包含 ANSI 代码或行号的文本粘贴到输入框,工具会自动清理并显示干净的文本。您可以复制清理后的文本用于文档、代码注释或其他用途。

  • 粘贴终端输出到输入框
  • 工具自动移除 ANSI 转义码
  • 移除行号前缀
  • 清理控制字符
  • 复制干净的文本

常见用例

这个工具特别适合处理 Claude Code 的输出、终端命令结果、日志文件内容等需要清理格式的场景。

Line numbers added by terminal multiplexers and log viewers also create extra noise. The formatter removes all of this automatically.

Typical Use Cases

  • Cleaning Claude Code session logs before sharing them in bug reports.
  • Copying terminal output into tickets, docs, or chat messages without escape-code noise.
  • Preparing log snippets for code reviews and documentation.
  • Removing line numbers from code listings so they can be pasted back into editors.

Tips

  • If a pasted block still looks odd, try toggling Strip Control to remove hidden characters.
  • The tool handles output from most modern terminals, including iTerm, Windows Terminal, and VS Code's integrated terminal.
  • There is no limit on input size, so you can clean very long logs in one pass.

常见问题

什么是 Claude Code 文本格式化器?+
这是一个专门用于清理 Claude Code 和终端输出的工具。它可以移除 ANSI 转义码、行号和各种控制字符,使输出文本干净可读。
为什么要清理 ANSI 代码?+
ANSI 转义码用于在终端中显示颜色和格式,但在复制到文本编辑器或文档时会显示为乱码。清理后可以获得纯文本内容。
这个工具会修改我的代码吗?+
不会。这个工具只处理文本输出,不会修改代码逻辑。它只是清理显示格式,使内容更易读。
Can I keep line numbers in the output?+
Line numbers are removed by default. If your output has no line numbers, or you only need to strip ANSI codes, you can turn the Strip Line Numbers option off before formatting.

相关工具

Claude Code 文本格式化器 — 免费的在线claude code 格式化, 终端输出清理, ansi 代码移除, 行号移除, 控制字符清理, strip control characters, text cleaner online, claude output formatter。无需注册。在浏览器中直接使用。