If you're using Claude Code you should just be writing out to Markdown - come on, what are you doing. But every so often you don't do that, and then you need to copy a big lump of text from the terminal. And when you do it's full of line breaks and god knows what else and, well … it sucks.
This tool de-sucks it. And while it's at it, it deals with pretty much anything you might copy out of the terminal and strips out all of the junk - ANSI colour codes, trailing spaces, paragraphs broken mid-sentence, quote markers, box-drawing characters, progress bar frames - it gets rid of it all and gives you decent looking text again, how you would have expected it to be.
It should work with any terminal emulator - VS Code, Windows Terminal, iTerm2, PowerShell, tmux, Warp, Alacritty, and the rest. Free, instant, nothing leaves your browser, bla bla bla, etc.
Yes, you could get Claude to roll you your own in approximately five minutes. But hey, I did test it all, and that took quite a bit longer than the first five minutes, and was significantly less fun. You're very welcome.
Claude wrote this. Well, he* didn't write this (or this) — he wrote the next bit. But he's just doing his best OK, and you have to appreciate his enthusiasm. Also, it is all 100% confirmed factually correct, I even read it once. OK, I skimmed it. It seemed fine ;)
* OK, sorry, but in my defense I'm around too many Italians. It's a gendered language, everything gets a gender. Claude got “he”. Italian has spoken.
Claude Code uses colour codes for syntax highlighting, diff views, and status indicators. When you copy its output, these invisible ANSI sequences come with it — your text looks clean in the terminal but pastes as garbled characters. This strips all SGR, cursor, OSC, and bracket sequences.
Claude writes long, flowing paragraphs. Your terminal wraps them at 80 or 120 characters. When you copy, each wrapped line becomes a separate line break. Paste it into an email or document and it looks terrible. This detects soft-wrapped prose and reflows it back into proper paragraphs.
Claude Code pads every line with spaces to fill the terminal width. A 30-character line becomes 160 characters of mostly invisible spaces. This affects formatting when pasting into code editors, markdown files, or anywhere that preserves whitespace.
Claude's quoted responses use the ▎ block-quote marker. These Unicode characters copy into your text as visible symbols that don't belong in the output. This strips them and reveals the original quoted content.
Claude's edit, read, and write tool outputs contain line numbers, diff markers, and TUI box-drawing characters. These are structured content that should stay exactly as they are — the paragraph reflow deliberately preserves them while fixing everything around them.
When Claude runs long operations, progress bars and spinners use carriage returns to overwrite the same line. Copy-paste captures every intermediate frame, turning a single progress bar into a wall of concatenated states. This simulates the overwrite to show only the final result.
Man pages and some legacy programs use backspace characters to render bold and underline text by overprinting. This resolves the overprint sequences back to clean readable text. Less common in Claude Code output, but it's in the pipeline.
Tab characters copy inconsistently across terminals — sometimes as literal tabs, sometimes as varying numbers of spaces. This normalises them to consistent 4-space indentation so your pasted output lines up properly.
Claude Code renders tables with Unicode box-drawing characters (┌─┬┐ etc.). Copy-paste preserves the grid visually but it's unusable in documents, emails, or issue trackers. This detects those tables, extracts the cell content (joining multi-line cells back together), and converts them to clean Markdown tables you can paste anywhere.
When copying a command session, prompts like user@host:~$, PS C:\>, or >>> come with it. Toggle this on to strip common shell prompt formats from line beginnings. Off by default because it's a destructive operation on non-prompt content.