A web tool that cleans up text copied from terminals. Paste on the left — get cleaned output on the right, instantly.
Text from Claude Code terminal often contains trailing spaces, whitespace-only lines, and extra leading indentation. These waste tokens and pollute prompts. Trim Text fixes that in one paste.
- Trailing whitespace removal — strips spaces/tabs from end of every line
- Empty line collapse — 3+ consecutive blank lines become 2
- Claude Code mode — dedents common leading whitespace (persisted in localStorage)
- Trailing space highlighting — red overlay shows exactly what gets trimmed
- Token counter — shows token count (GPT o200k_base) and how many tokens you save
- Token visualization — color-coded token boundaries for both input and output
- Copy button — one-click copy of cleaned text
- Dark theme — designed for developers
- React 19 + TypeScript
- Vite 7
- TanStack Router
- Tailwind CSS v4 + shadcn/ui (base-nova)
- JetBrains Mono
- gpt-tokenizer (local, no API calls)
bun install
bun run devbun run build
bun run previewMIT