How to Clean Text Before Pasting It into AI
Updated November 14, 2026
Quick answer: before you paste, remove what the AI doesn't need: hidden characters, odd spacing, repeated headers and footers, long email reply chains, and any personal details. Cleaner text uses fewer tokens and gets more focused answers. The cleaner below handles the hidden characters and spacing in one step.
Step 1: Remove hidden characters and odd spacing
Step 2: Cut what the AI doesn't need
- Page numbers, running headers and footers from PDFs.
- Repeated “On Monday, Jane wrote:” quote chains in email threads. Keep only the newest message and anything still relevant.
- Email signatures, legal disclaimers and boilerplate.
- Navigation menus and cookie notices from copied web pages.
Cleaning a video or meeting transcript? Timestamps and filler words are the biggest waste there. Use the Transcript Cleaner, or follow our guide to removing timestamps from a YouTube transcript.
Step 3: Hide personal details
Names, emails, phone numbers and account numbers rarely matter to the task. Replace them with placeholders using the PII Redactor. You can swap the real details back into the AI's answer afterwards. Our guide on removing personal information before ChatGPT walks through it.
Step 4: Check the size
Run the cleaned text through the token counter. If it's still too long for your AI, use the document splitter.
Frequently asked questions
Why clean text before giving it to an AI?
Junk like repeated headers, email signatures and hidden characters uses up tokens and can distract the AI. Clean text fits more easily and gets more focused answers.
What are hidden characters?
Characters that don't show on screen, such as zero-width spaces and special no-break spaces. They often come along when you copy from PDFs, web pages, Word or other AI chats.
Should I remove personal information too?
Yes, if you're pasting work documents, customer messages or anything with names, emails or account details. Use the PII Redactor for that step.
Is my text uploaded?
No. The cleaner runs entirely in your browser.
Related guides
- Remove Personal Info Before ChatGPT · Redact, send, then restore the details.
- Summarize a YouTube Video with ChatGPT · Copy the transcript, clean it, paste it. Prompts included.
- Remove Timestamps from a YouTube Transcript · One paste removes timestamps, [Music] and um/uh.
- ChatGPT Token Limit · How much you can send and how long replies can be.
Free tools
- Invisible Character Remover · Find and remove hidden characters in AI-generated text.
- Transcript Cleaner · Strip timestamps and filler words from YouTube and meeting transcripts.
- PII Redactor · Hide emails, phone numbers and secrets before pasting into AI.
- JSON Repair · Fix broken JSON from ChatGPT, Claude and Gemini.
- Token Counter
- Context Window Calculator
- Document Splitter