Cleanup Claude Code Paste

Simon Willison's Blog / 4/6/2026

💬 OpinionTools & Practical Usage

Key Points

  • Simon Willison shares a highly specific web tool, “Cleanup Claude Code Paste,” meant to clean up prompt and whitespace artifacts when copying terminal output from the Claude Code app.
  • The tool removes the special “❯” prompt, fixes whitespace issues from wrapped lines, and joins lines into more readable, clean text for reuse.
  • It includes an input/output workflow that lets users paste raw terminal output and quickly copy the cleaned result to the clipboard.
  • The author notes this is useful for common prompt-copying workflows where Claude Code’s terminal formatting adds unexpected extra whitespace.
  • A related example describes handling secrets via an optional flow that replaces matched sensitive strings with “REDACTED” and rewrites files after user approval.
Sponsored by: WorkOS — Production-ready APIs for auth and access control, so you can ship faster.

6th April 2026

Super-niche tool this. I sometimes copy prompts out of the Claude Code terminal app and they come out with a bunch of weird additional whitespace. This tool cleans that up.

Screenshot of a web tool titled "Cleanup Claude Code Paste" with the subtitle "Paste terminal output to remove the ❯ prompt, fix wrapped-line whitespace, and join lines into clean text." An input textarea contains pasted terminal output starting with "❯ Add a -r/--redact option which asks for user approval (after telling it how many replacements will happen and in which files and which lines – standard output basically) and then rewrites the files in that folder to replace all matched secrets with REDACTED. Run tests with 'uv run pytest' and use red/green TDD". Below is a "Cleaned output:" section showing the same text with the ❯ prompt removed and whitespace cleaned up. A blue "Copy to clipboard" button appears at the bottom.

Posted 6th April 2026 at 2:55 am

This is a beat by Simon Willison, posted on 6th April 2026.

tools 55 claude-code 104

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe