Free tools

Terminal text cleaner

Paste text you copied from Claude Code, Codex or any terminal. It comes back as the paragraphs, lists and tables it was meant to be.

Copied text
Clean text

Runs in your browser. Nothing you paste leaves this page.

What it fixes

How it decides what to join

It finds the width the text was wrapped at (the longest line) and joins a line to the next one only when the line is full: long, and the next word would not have fit after it. Lists, headings, quotes, code fences and prompts always start a new line, and line-by-line output such as git log, file listings, logs and code is left as it is.

This is the same logic the Unwrap app uses when it can't find the original reply, ported to JavaScript and checked against the app's test copies. It is a heuristic: if a short line was meant to stay short, it stays short, and if something looks wrong you still have your original on the left.

Why terminals copy text like this

A terminal draws characters on a grid. When you select and copy, you get the grid back: hard line breaks where the window ended, the spaces that padded each row, and whatever symbols the program drew in the margin. Here's the longer explanation, with the fixes that work inside Claude Code itself.