Why PDF Text Loses Its Spaces
A PDF doesn't store text the way a Word document does. Instead of a continuous string of characters with spaces typed between them, many PDFs place each word (or even each letter) at a specific x/y coordinate on the page. To get a gap between two words, the software that created the PDF often just moves the invisible "cursor" over to the next position, rather than inserting an actual space character. Visually, on the page, it looks exactly right. But a tool reading the underlying text — whether that's your browser's copy/paste, a script, or a text-extraction tool — is looking for space characters, not gaps in coordinates. If there's no real space character in the data, the tool has nothing to insert, and the words get glued together when extracted.
Why Some PDFs Do This and Others Don't
This isn't a universal PDF flaw — it's inconsistent, which is part of what makes it so confusing. Whether a PDF stores real spaces depends entirely on the software that generated it. Simple PDFs from a word processor usually keep real space characters and extract cleanly. Justified text (where word gaps are stretched to fill a line) is a common trigger, because the renderer is already repositioning text to make the line fit, and skips the space character in the process. Tables and multi-column layouts are another frequent culprit, since each cell or column is often placed independently on the page with no space linking it to its neighbor. Figure captions, PDFs exported from design tools, and older scanning/printing software follow the same pattern. There's no way to tell just by looking at a PDF whether it will extract cleanly — you have to try it.
If It's a Scanned PDF, the Fix Is OCR, Not Extraction
If your PDF is a scan or a photo of a document — a signed contract, a printed article, an old form — there's no text layer to extract from at all. What looks like text is actually a picture of text, so every extraction tool is guessing based on pixels, and that's where the worst spacing garbles usually come from. The fix here isn't a better extraction method — it's OCR (optical character recognition), which reads the image and reconstructs real, properly spaced text from scratch rather than trying to pull spacing data that was never there. Pixeltools' [OCR PDF tool](/ocr-pdf) does this entirely in your browser: it re-reads each page as an image and rebuilds an actual text layer with real space characters, which is a fundamentally different (and usually much more reliable) process than extracting from a PDF that was never text-based to begin with.
If It's a Real Text PDF, Try a Different Extraction Method
If the PDF does have selectable text but copy/paste or your extraction tool still garbles the spacing, the problem is usually how that specific tool interprets the coordinate gaps described above — and different tools make different judgment calls about when a gap counts as a space. That means switching tools can genuinely fix it, without changing anything about the PDF itself. Pixeltools' [Extract Text from PDF tool](/pdf-to-text) is worth trying as a second opinion: it processes the file locally in your browser and may parse the same document more cleanly than whatever produced the garbled copy/paste. If one method glues words together, don't assume the text is unrecoverable — try extracting it a second way before concluding you'll need to fix it by hand. Concretely, it makes that judgment call by comparing the horizontal gap between two glyph runs to about 20% of the text's own font height rather than trusting the PDF's own space characters, which is why it can recover spacing some PDFs never actually encoded.
See the Real Text Before You Clean It Up
Before doing any manual fixing, paste the extracted text into a plain-text editor (Notepad, TextEdit, or a code editor) rather than straight into a word processor. Word processors sometimes apply autocorrect or smart formatting that can mask what's actually in the text, or accidentally "fix" things in a way that hides the real pattern of missing spaces. In a plain-text view, you can see exactly where words run together, whether the problem is scattered or systematic, and whether it correlates with line breaks, table rows, or specific sections of the document. Once you can see the actual pattern, moving the cleaned-up text into your word processor for final formatting is much easier — and you'll waste less time fighting autocorrect while you're still trying to diagnose the problem.
Manual Cleanup When You Still Have Garbled Text
If extraction still leaves some words joined together, most word processors' find-and-replace can handle common, predictable patterns — for example, searching for a lowercase letter directly followed by an uppercase letter (a pattern many editors support with "regular expression" or "use wildcards" search mode) often catches cases like "wordNextword" and lets you insert a space at each one. This won't catch every case, especially where two lowercase words run together with no capital letter to signal the boundary, and you'll likely still need to read through and fix a few by eye. Doing this on a short document (a page or two) is realistic; doing it on a 50-page report by hand isn't — for longer documents, it's usually faster to re-extract with a different tool or method first and only hand-fix what's left.
No Tool Fixes This Perfectly Every Time
It's worth being upfront about this: missing or garbled spacing in extracted PDF text is a structural quirk of how some PDFs store positioning data, not a bug that any single tool can universally patch. OCR reliably solves it for scanned documents because it's reconstructing text from an image rather than trying to recover spacing that was never encoded. Switching extraction methods helps for many real-text PDFs, because different parsers make different calls about coordinate gaps. But for a PDF with unusually dense tables, heavily justified text, or unconventional formatting, some manual cleanup may still be unavoidable no matter which tool you use. Treat these as your best available fixes, not a guarantee — and if the source document is available in another format (like the original Word file), extracting from that instead will always beat working around a PDF's quirks.