Fix broken words and line breaks in text copied from a PDF
Rejoins words split by hyphens and line breaks while keeping real hyphenated words and the original formatting intact.
The prompt
Clean up text I copied from a PDF or scan so it reads normally.
Text: [PASTE TEXT]
Format to keep: [plain text / Markdown / keep the existing headings and lists]
Language: [e.g. English]
Fix only these problems:
1. Words split across lines with a hyphen (e.g. "infor- mation" or "infor-\nmation") - rejoin them into one word.
2. Real compound words and hyphenated terms (e.g. "well-known", "COVID-19", "long-term") - keep the hyphen. If you cannot tell whether a hyphen is real, keep it and list the word at the end.
3. Hard line breaks in the middle of sentences - join them into normal paragraphs, but keep real paragraph breaks, headings, list items, and table rows.
4. Stray page numbers, running headers, or footers repeated in the text - remove them and list what you removed.
5. Obvious extraction artifacts like doubled spaces or ligature errors (e.g. "fi" shown as a broken character).
Rules: do not reword, correct grammar, change spelling, or summarize anything. The output must contain the same words in the same order.
Return:
1. The cleaned text.
2. A short list of uncertain hyphens and anything removed, so I can check them.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Writing & Editing prompts
What to fill in
- PASTE TEXT
- plain text / Markdown / keep the existing headings and lists
- e.g. English
How this prompt is built
This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.
Related prompts
- Proofread for mistakes without rewriting my styleCatches grammar, spelling, punctuation, and consistency errors and changes nothing else.
- Rewrite text in a different tone, length, or styleAdapts the same message for a new tone, audience, length, or point of view without changing the facts.
- Make AI-sounding text sound natural and humanRemoves the robotic tells from AI drafts so the writing sounds like a real person.
- Translate text so it sounds native, not translatedTranslates and localizes text for a specific audience while keeping meaning and tone.