Clean Text for AI
Clean Text for AI fixes text copied from a PDF or web page before you paste it into an AI chat: it rejoins lines broken at the page width, mends hyphenated words and removes repeated headers, footers, page numbers and invisible characters, then shows the tokens before and after.
How to use Clean Text for AI
- Paste the text you copied from a PDF, web page or email.
- Turn off any clean-up you do not want; the list under the result shows what was removed.
- Copy the cleaned text into your AI chat, or download it.
Frequently asked questions
Why clean text before pasting it into ChatGPT or Claude?
Text copied from a PDF often has a line break at the end of every printed line, words split with a hyphen, and the page header, footer and page number repeated on every page. The model reads all of it, so it costs tokens and can split sentences in the wrong places.
How does it know which lines are headers and footers?
A line counts as a running header or footer when the same words appear on three or more lines, even if a number in it changes, such as "Report 2025, page 4". Each removed line is listed, so you can turn the option off if it caught real text.
How does it decide which lines to join?
A line is joined to the next when it is nearly as long as the longer lines of the text, which means the PDF broke it only because it reached the page width. Short lines, such as headings and the end of a paragraph, and list items stay on their own line.
How much does it save?
It depends on the text. The page counts the tokens of the original and the cleaned text with the o200k tokenizer used by GPT-4o and newer OpenAI models, so you see the difference on your own text. Claude and Gemini count differently.
Is my text uploaded?
No. Everything runs in your browser and nothing is sent to a server.
Next step
Want to check how much of a context window it fills? Count its tokens. Open AI Token Counter.
Related tools
- 095