Why Copied Text From a PDF Comes Out Garbled (and How to Fix It)
Published 2026-11-12 · NoFilePDF
You can handle this directly in your browser with our free pdf to word tool — nothing gets uploaded.
Why Copied Text From a PDF Comes Out Garbled (and How to Fix It)
You select a paragraph from a PDF, hit Ctrl+C, and paste it into Word. Instead of clean text you get boxes, question marks, characters in the wrong order, or one huge run-on line that used to be six paragraphs. This is one of the most common annoyances people hit when trying to pull text out of a PDF, and almost nobody is told *why* it happens. This post walks through the six root causes behind garbled copied text and gives you a practical, step-by-step way to fix each one.
The Six Root Causes of Garbled Copied Text
1. The PDF Has a Subsetted Font With No ToUnicode Mapping
When a PDF is created, the authoring application embeds the font it used. To keep the file small, it often embeds only the *subset* of characters actually used. More importantly, it may not include a ToUnicode CMap — the internal table that tells a PDF viewer "when you copy this glyph, map it back to Unicode character X."
Without that mapping, when you copy text, the clipboard gets the *internal glyph codes* instead of real characters. Pasting into Word or a browser then produces boxes, random symbols, or nonsense strings. This is the single most common cause of the "copied text looks like garbage" problem, and it is especially frequent in PDFs generated by older design tools, low-cost e-book exporters, or PDFs that were stripped to reduce file size.
How to fix it:
Try opening the PDF in a *different* viewer. Some viewers (e.g., Adobe Acrobat, Foxit Reader, or modern browsers) attempt a best-guess mapping even when the ToUnicode table is missing, and that guess can be good enough for most Latin characters.
If the PDF was produced by a tool you control, regenerate it with full font embedding (not subset) and ensure the ToUnicode CMap is included. In LaTeX, the pdfLaTeX engine and the fontspec package do this automatically; in Word, use "Save as PDF" rather than printing. In InDesign, enable "Embed subsets" off and "Embed complete fonts" on.
If you cannot regenerate the file, use an OCR or text-layer repair tool to rebuild the mapping.
2. Ligatures and Special Glyphs
A ligature is when two characters are drawn as a single glyph — for example, "fi" or "ff" appearing as one connected symbol. Older and some modern fonts use ligatures by default. When the PDF has no ToUnicode mapping, the ligature glyph copies as a *single* character that Word does not recognize, so you get a box or a weird symbol in place of "fi."
Some fonts also map common characters to unusual glyphs. For instance, a typographic font may use an "em dash" glyph that is not the standard U+2014 character, or a math font may represent the integral sign with a custom glyph. Copying from those fonts gives characters that look almost right but are actually wrong Unicode code points, which downstream tools then mangle.
How to fix it:
In Word or most word processors, after pasting, run Find & Replace to fix common ligatures. Search for the ligature character and replace it with the plain text (e.g., replace the fi ligature with "fi", the fl ligature with "fl").
If the whole document is affected, use a tool like pdf2txt, Inkscape text export, or LibreOffice Draw that normalizes ligatures during extraction.
If you are the PDF author, disable ligatures in the source document before export. In LaTeX, use a font that does not auto-ligature, or add \usepackage{microtype} with protrusion=false.
3. The PDF Is a Scan (No Text Layer at All)
A scanned PDF is essentially a collection of *images* wrapped in a PDF container. There is no hidden text for the viewer to select. If you can select "text" from such a PDF, that text comes from an OCR layer that was added later. If the OCR layer is missing, broken, or low quality, what you copy will be random characters, nothing at all, or a jumble of boxes. The visual appearance looks fine, but the underlying text is garbage or absent.
You can tell a PDF is a scan by trying to select text: if nothing highlights, or the selection box does not follow word boundaries, you are looking at an image. Zoom in far — if characters look pixelated, it is definitely a scan.
How to fix it:
Run OCR on the PDF. The most reliable free option is ABBYY Fine Reader (trial version works well for one-off documents), Adobe Acrobat Pro (Edit PDF, then run OCR), or the open-source ocrmypdf command-line tool, which adds a searchable text layer without altering the visual page.
If using OCRmyPDF: ocrmypdf input.pdf output.pdf --language eng — this embeds a proper text layer, after which copying works normally.
For very large or complex scans, expect to do a spot-check after OCR. OCR engines are excellent for clean, printed text but struggle with handwritten notes, low-resolution faxes, or multi-column layouts. Re-scan at 300 dpi or higher if quality is poor.
4. The PDF Was Compressed into a Single Image
Some PDFs — especially those exported from certain mobile apps, fax-to-PDF services, or older print drivers — do not embed fonts at all. Instead, they rasterize the entire page into a single JPEG or PNG image. Visually it looks fine, but there is *zero* text data in the file. Selecting and copying yields nothing useful, or the viewer falls back to a very rough OCR pass that produces terrible results.
You can confirm this by checking the PDF properties. If the file size is disproportionately large for the amount of text it contains (e.g., a 10-page text document is 15 MB), it is likely image-based. Also, if you zoom in and the text looks pixelated or has JPEG compression artifacts, it is an image.
How to fix it:
Convert the PDF pages to images, then run OCR on the images. Tools like PDF24 OCR, Online2PDF OCR, or OCRmyPDF handle this workflow.
If you have the original source file (Word, LaTeX, InDesign), re-export the PDF with proper font embedding. This is always better than OCR.
For a quick-and-dirty fix on a one-off document: take a screenshot of the page at high resolution and run it through an online OCR service.
5. Multi-Column Layouts Produce Out-of-Order Text
PDFs with two-column or three-column layouts — think newspaper-style articles, journal papers, magazine spreads — are notoriously bad for text extraction. The PDF stores text in a *drawing order* that often does not match the *reading order*. A naive extractor reads the left column top-to-bottom, then the right column, or interleaves them, or (worst case) reads every second line across both columns. The result: you copy text and it appears as a jumbled run-on paragraph where sentence fragments from two different columns are interleaved.
This is not a font problem. The individual characters are correct, but their *order* is wrong. It is the most common cause of "the text looks like nonsense" when the document is a two-column layout.
How to fix it:
Best option: Use a viewer or tool that respects reading order. Adobe Acrobat (Extract Text feature) has an option to extract by column. PDF-XChange Editor has a "Text Select" mode that lets you drag a selection box per column. Foxit Reader also supports column-aware extraction.
Manual method: Copy the left column text into a text editor first, then the right column. Paste them in order. This is tedious but reliable for short documents.
Convert to a layout-aware format first: Use LibreOffice Draw or Inkscape to import the PDF, then copy text object by object. Or use pdf2txtx (a command-line tool by the poppler project) which can be told to extract text in visual order.
For journal articles, the PDF often has a companion plain-text version on the publisher's website. Check the article landing page for a "Download text" or "View full text" link.
6. Special Symbols, Math Fonts, and Non-Standard Encodings
PDFs that contain mathematical notation, chemical formulas, musical symbols, or characters from non-Latin scripts (Arabic, Hebrew, CJK) use specialized fonts that are *not* part of the standard Unicode character set. The PDF may use a private-use-area code point, a font-specific glyph index, or an entirely custom encoding. When you copy such text, the clipboard receives a code point that Word or a browser has no way to render, so you get boxes or empty spaces.
Even in otherwise normal documents, special symbols like the copyright sign, the Euro sign, or a small set of typographic marks can be affected if the font used a non-standard glyph for that symbol.
How to fix it:
If the symbol is critical (e.g., a chemical formula in a patent), manually type the replacement. Use Word's built-in symbol insert (Insert, Symbol) or the character map on your OS.
For math-heavy documents, consider MathType or the LaTeX editor Overleaf to rebuild the equation in a standard format.
For non-Latin scripts, ensure your operating system and clipboard application have the correct font and Unicode support installed. Windows 10/11 and macOS handle most major scripts out of the box; if you see boxes for CJK characters, install the appropriate CJK font (e.g., Noto Sans CJK, Source Han Sans).
Use a tool that *normalizes* special characters during extraction. pdf2txtx with the -enc UTF-8 flag maps most private-use-area code points to their nearest standard Unicode equivalent.
A Step-by-Step Troubleshooting Checklist
When you hit garbled copied text, work through this list in order. Each step takes only a few minutes and covers the most likely cause.
Check if the PDF has a text layer at all. Try to select text. If nothing highlights or the selection does not follow words, jump to the OCR section (Root Cause 3 or 4). If you can select text, continue.
Try a different PDF viewer. Open the same file in Adobe Acrobat, Foxit, and your browser. Copy from each. If one viewer gives clean text and another gives boxes, the problem is viewer-dependent and you have already found your workaround.
Check the font. Look at the font name in your viewer's info panel. If it is an unusual name (e.g., a prefix followed by a plus sign and then the font name, which indicates a subsetted font), you are hitting Root Cause 1. Use a different viewer or a repair tool.
Look for ligatures. Search the pasted text for boxes or odd symbols. If you see single boxes where "fi" or "fl" should be, use Find and Replace (Root Cause 2).
Check the layout. Is the document two-column? If the text order is scrambled but the characters are individually correct, you are hitting Root Cause 5. Use a column-aware extractor.
Check for special symbols. Are the garbled characters all in the same type of content — math, music, a non-Latin script? If so, Root Cause 6 is likely. Manually rebuild or use a normalizing tool.
As a last resort, run OCR. Even if the PDF has a text layer, if that layer is broken, a fresh OCR pass on the *visual* page can produce a clean, copyable text layer. Use ocrmypdf for a quick fix, or ABBYY Fine Reader for the highest accuracy.
Pre-Copy Self-Checklist
Before you start copying text out of a PDF, run this quick check. It saves you from discovering the problem halfway through a long document.
Can I select text with the mouse? If not, it is a scan, go to OCR.
Does the font name look normal, or does it have a subsetting prefix?
Is the layout single-column or multi-column?
Does the document contain math, music, or non-Latin characters?
What is the file size relative to the page count? Over one megabyte per page for a text-only document is a red flag.
Do I have the original source file (Word, LaTeX, InDesign)? If yes, export a clean PDF or copy from the source instead.
Five Frequently Asked Questions
Q1: Why does copying the same PDF work in Adobe Acrobat but not in my browser?
Different viewers implement the ToUnicode mapping differently. Adobe Acrobat has a more robust fallback: when the CMap is missing, it attempts to guess the mapping from the font's internal data. Browsers and many lightweight viewers do not do this guessing, so the same file copies cleanly in one and produces boxes in the other. This is not a bug — it is a difference in how strictly the viewer follows the PDF specification.
Q2: I ran OCR on a scanned PDF, but the copied text still has errors. What do I do?
OCR is not perfect. For high-stakes documents (legal filings, medical records), proofread the OCR output manually. For low-stakes use, accept a small error rate. If accuracy matters and you control the source, re-scan at a higher resolution (300 dpi minimum, 600 dpi preferred for small text) and ensure the scan is flat, evenly lit, and not skewed. Some OCR engines also let you specify the expected text layout (two-column, form, etc.), which significantly improves results.
Q3: Can I fix a broken ToUnicode mapping without regenerating the PDF?
Yes, partially. Tools like pdf2htmlEX or community repair utilities can read the font's glyph outlines and attempt to re-map them to Unicode characters. The success rate is high for standard Latin fonts and lower for custom or non-Latin fonts. For a one-off document, using a different viewer that has a better fallback is often faster than running a repair tool.
Q4: Is there a way to prevent this problem when I create PDFs?
Yes. Always export with full font embedding (not subset), enable ToUnicode CMap generation (most modern tools do this by default — Adobe Acrobat, Word's Save as PDF, LaTeX pdfLaTeX), and avoid ligatures if the document will be copied and pasted frequently. In LaTeX, use a font that does not auto-ligature, or add the microtype package with protrusion disabled. In Word, the built-in PDF export handles this correctly in most cases; if you are using a third-party PDF driver, test the output before distributing.
Q5: My organization has thousands of legacy PDFs with this problem. Is there a batch solution?
Use ocrmypdf in batch mode to add a clean text layer to every scanned PDF in a folder. For PDFs that have a broken but present text layer, tools like pypdf (Python) can strip the broken layer and re-run OCR. For the simplest case, just re-export from the source file if you still have it — this is always more reliable than repairing a broken PDF.
One-Line Summary
Garbled copied text from a PDF is almost always caused by one of six things — missing ToUnicode mappings, ligatures, no text layer, image-only PDFs, multi-column ordering, or special-symbol fonts — and each has a specific fix, from switching viewers to running OCR to manually rebuilding the text layer.
Why does copying text from a PDF result in random characters or spaces?
This usually happens when the PDF uses embedded fonts without proper Unicode mapping. The viewer tries to copy glyphs but fails to map them to standard text codes. To fix this, use OCR (Optical Character Recognition) in your PDF tool to re-identify the text layer, ensuring characters are correctly converted to editable Unicode.
What should I do if copied text has invisible characters or missing spaces?
Invisible characters often result from complex text layout engines. To fix this, avoid relying on basic copy-paste. Instead, use a PDF tools Extract Text feature that reconstructs paragraphs based on visual alignment. This cleans up hidden control characters and ensures proper spacing between words and sentences during the export process.
Can I fix garbled text without converting the entire PDF to an image?
Yes. Most modern browser-based PDF tools offer a Redetect Text Layer or OCR button. Click it to re-analyze the current page without rasterizing the whole document. This updates the hidden text stream so that copy-paste functions normally. It is faster than full image conversion and preserves text editability for subsequent use.
Why does the text look correct on screen but copy as gibberish?
This discrepancy occurs because the PDF displays visual glyphs while storing separate hidden text data. If the text layer is corrupted or missing, the screen shows the image but copy uses the broken data. Use your PDF tools OCR feature to rebuild the text layer. This aligns the hidden data with what you see, restoring accurate copy functionality.