Terminal & DevOps

AI CLI & Terminal Output Cleaner

Free online tool to sanitize copied terminal logs, AI agent CLI outputs, and code snippets. Strip ANSI escape sequences, shell prompts ($ and >), editor line numbers, markdown code fences, leading spaces and indentation, and CLI spinners in one click.

Presets:
Samples:
259 chars · 9 lines
-135 chars (52%)

Active Cleaning Filters

How to use

  1. Step 1: Paste copied terminal logs, Claude Code output, or compiler error traces into the raw input box.
  2. Step 2: Select a cleaning preset (Claude Code, Strict Code, Shell History, Line Numbers Only) or toggle individual filters.
  3. Step 3: Review the Cleaned Output preview on the right with real-time character reduction and line metrics.
  4. Step 4: Click "Copy Cleaned" to save the sanitized code to your clipboard ready for execution or documentation.

Frequently asked questions

What are ANSI escape sequences and why do they pollute copied output?
ANSI escape sequences are byte sequences (like \x1b[32m or [0m) sent by terminal programs to format text with colors, bolding, or cursor movements. When copying logs from terminal emulators or CI pipelines, these control characters frequently get copied as raw text. This tool strips all 8-bit, 16-color, 256-color, and TrueColor ANSI codes cleanly.
Why should I remove shell prompts ($ and >) from commands?
Tutorials and documentation frequently format commands with leading dollar signs ("$ npm install") or angle brackets ("> cargo run"). If a developer copies and pastes that command directly into a bash or zsh terminal, the shell tries to interpret "$" or ">" as a variable or redirection operator, causing a syntax error. Stripping prompts makes commands immediately executable.
How does line number stripping preserve code structure?
When copying snippets from GitHub, GitLab, VS Code, or Stack Overflow, line number gutters (such as "1 |", "2:", or leading digits) are often inadvertently selected. Our cleaner detects sequential numeric prefixes and strips only the gutter numbers while preserving nested block indentation and internal code spacing.
Can this tool clean Claude Code and AI agent terminal logs?
Yes. AI coding agents (Claude Code, Aider, Codex CLI, OpenCode) generate terminal output intermingled with status spinners, tool-use notifications ("[Agent] Executing tool: run_command"), and markdown code fences. The "Claude Code" preset isolates executable shell commands and code snippets from transient AI telemetry.
Does any copied log data leave my browser?
No. All regular expression parsing and string sanitation occur 100% on the client side using your browser's local JavaScript engine. Your terminal output, proprietary code, environment variables, and logs are never uploaded to any backend server.

The Senior Full-Stack Production Kit (2026)

Checklists, Docker recipes, and SSR error fixes in one dense PDF.

Get Free Kit

Related articles