Claude Code Paste Cleaner

Paste anything copied from the Claude Code terminal and get clean text back — strips ⏺ and ⎿ markers, spinner glyphs, box borders, and re-joins wrapped lines. Markdown mode rebuilds the headings, quotes, lists, and code blocks Claude actually wrote.

Strip every terminal artifact — flat text for tickets, chat, and commit messages.

0 lines
Clean text
0 lines
Cleanup rules

Everything runs in your browser — nothing you paste is uploaded or stored.

Instructions

  1. Copy from your terminal — select the Claude Code output you want (a whole response, a session summary, anything) and copy it.
  2. Paste it above — cleaning happens instantly in your browser as you paste. Nothing is uploaded.
  3. Pick a modePlain text strips every terminal artifact for tickets, Slack, and commit messages. Markdown also rebuilds the structure Claude originally wrote: headings, blockquotes, nested lists, and code fences.
  4. Copy the result — "Copy" gives you the cleaned text. In Markdown mode, "Copy for Docs/Notion" puts rich formatted text on your clipboard so it pastes into Google Docs, Notion, or an email with real headings and lists.

Every rule is a toggle, and each one shows a live count of what it caught, so you can see exactly what was removed and turn any rule off if it's too aggressive for your paste.

Why Claude Code pastes look broken

Claude Code renders its responses for a terminal, not a clipboard. When you select and copy, you get the rendering, not the text: every assistant message is prefixed with , every tool result with , long paragraphs are hard-wrapped at your terminal's width with hanging indents, and spinner glyphs, box-drawing borders, and hints like +47 lines (ctrl+o to expand) ride along.

This cleaner's rules come from reading the Claude Code CLI source rather than guessing at patterns. That matters for the details generic terminal cleaners miss — like OSC 8 hyperlink escapes, or the exact way markdown is flattened before it reaches your screen.

What Claude Code actually puts in your clipboard

ArtifactWhat it isWhere it's defined
/ Prefix on every assistant message and tool call ( on macOS, elsewhere)BLACK_CIRCLE in the CLI's figures constants
Tool-result marker, indented two spacesThe message-response renderer
· ✢ ✳ ✶ ✻ ✽Spinner animation frames, often with a verb line like ✻ Cogitating… (esc to interrupt)Spinner frame set
╭ ╮ ╰ ╯ │ ─ ━Round borders on the input box, dialogs, and bannersTerminal box drawing
Blockquote bar — what a markdown > quote becomes on screenBlockquote prefix constant
☐ ☒ ○ ◐ ● ◉ ◇ ◆Todo checkboxes, effort levels, and review status diamondsStatus indicator glyphs
123→Line-number gutters on file readsFile-read output format
… +47 lines (ctrl+o to expand)Truncation hints, interrupt prompts, shortcut helpUI chrome strings
Invisible escapesANSI color codes and OSC 8 hyperlink wrappers around linksTerminal escape sequences

Markdown mode: recovering what Claude actually wrote

The terminal renderer flattens markdown — it doesn't just style it. Headings become bold text with no #. Inline code loses its backticks. Blockquotes become a bar. Nested ordered lists cycle their markers by depth: numbers at the top level, letters one level down, roman numerals below that (1.a.i.).

That flattening is deterministic, which means it can be inverted. Markdown mode:

  • Turns -barred lines back into > blockquotes.
  • Converts a. and i. nested markers back into properly indented 1. lists.
  • Wraps line-numbered file output back into fenced code blocks.
  • Promotes short standalone title lines back into ## headings (a conservative heuristic you can toggle off).
  • Rebuilds terminal hyperlinks as [text](url) markdown links.
  • Keeps a blank line between what were separate messages, so responses don't fuse into one paragraph.

"Copy for Docs/Notion" then converts that markdown to rich text on your clipboard, so the structure survives the paste into Google Docs, Notion, Confluence, or an email.

Does it work for Codex CLI and Gemini CLI?

Mostly, yes. The generic rules — ANSI escapes, box drawing, wrapped-line reflow, unicode whitespace, trailing space — apply to any terminal UI. The Claude-specific rules (/ prefixes, spinner verbs, list-marker cycling) simply won't match anything and do no harm. If you paste from another agent CLI and see leftover artifacts, the toggles let you see exactly which rule would need to catch them.

FAQ

What is the ⏺ symbol in Claude Code output?

It's the message bullet Claude Code draws in front of every assistant message and tool call — U+23FA "black circle for record" on macOS, and a plain on Linux and Windows, where the taller glyph doesn't align well. It's rendering decoration, not content, which is why it ends up polluting your clipboard.

What does the ⎿ symbol mean?

marks a tool result — the output of a file read, shell command, or search that Claude ran. In the terminal it's drawn indented under the tool call it belongs to, and it comes along whenever you copy across one.

Why do copied lines break mid-sentence?

The terminal hard-wraps text at your window width, and copying grabs those visual line breaks as real newlines — often with leading spaces from the hanging indent. The re-join rule detects wrapped prose and merges it back into full paragraphs, while leaving lists, quotes, and code alone.

Why did the headings and backticks disappear?

The terminal renderer replaces markdown syntax with visual styling: ## Heading becomes bold text, `code` becomes colored text. The styling is ANSI color codes, which most terminals don't include in copies — so the syntax is simply gone. Markdown mode reconstructs what it can from the structure that survives.

Is my text uploaded anywhere?

No. The cleaner is entirely client-side — the page never sends your paste to a server, and nothing is stored. That's deliberate: terminal sessions routinely contain file paths, code, and keys that shouldn't leave your machine.

Can I turn off individual rules?

Yes — every rule is a checkbox with a live count of how many things it caught in your current paste. If a rule is eating something you wanted to keep (say, you want the bullets preserved), flip it off and the output updates instantly.

These tools are how Elegant Atomics thinks about growth for B2B SaaS. Work with us. Work with us →