Cleaning up text pasted from Word and Google Docs into WordPress
Most WordPress content starts life somewhere else: a Word file from a client, a Google Doc reviewed by three people, a PDF brief. Pasting it into the editor is the fastest way to publish — and the most reliable way to bring along invisible junk. This guide lists what typically comes with the paste, how to paste more cleanly, and how to clean up content that is already published.
Contents
What comes along with the paste
- Extra spaces. Double spaces after periods, spaces used for alignment, spaces left before commas after edits and tracked changes.
- Non-breaking spaces (
) that Word and Docs use to keep words together — and that stop text from wrapping naturally on narrow screens. - Empty paragraphs. Blank lines used for spacing in the document become empty paragraphs or empty blocks.
- Line breaks instead of paragraphs.
Shift+Enterin the document becomes<br>tags, sometimes two in a row. - Inline styles and fonts — mainly in the Classic editor:
style="font-family: Calibri",<span>wrappers and Word'smso-classes, which override your theme's typography. - Fake headings. Bold, larger text instead of real heading styles. It looks like a heading but is a paragraph for search engines and screen readers.
- Images that are not in your Media Library. Images copied from Google Docs can arrive as links to Google's servers rather than uploaded files, and such links may stop working later.
What the block editor cleans up — and what it doesn't
The block editor handles pasted documents far better than the Classic editor did. It converts the paste into blocks — paragraphs, headings (when the document used real heading styles), lists, tables, quotes — and drops most inline styles, fonts and Word-specific markup.
What it does not fix is the text itself. Double spaces, spaces before punctuation, glued words after an edit (end.Next), -- typed instead of a dash and leftover empty paragraphs go straight into your content. In the editor these are easy to miss; across hundreds of posts they add up.
How to paste cleanly
- Use real styles in the document. Heading 2 and Heading 3 in Word or Docs become heading blocks; bold text does not.
- Paste as plain text when formatting does not matter — Ctrl+Shift+V (Cmd+Shift+V on a Mac) — and add headings and links in WordPress. In the Classic editor, the Paste as text button does the same.
- Try Markdown from Google Docs. With Markdown enabled in Google Docs (Tools → Preferences), Copy as Markdown gives clean text with headings, lists and links, and the block editor converts pasted Markdown into blocks.
- Upload images separately. Download them from the document and add them through the Media Library, so they are stored on your site with proper alt text.
- Check the result in the code editor (Options → Code editor) once, on a typical document, to see what your workflow really produces.
Cleaning up content that is already published
If years of pasted content are already on the site, fixing it post by post is not realistic. Content Polisher scans the whole site and finds the text-level leftovers of copy and paste:
| Leftover | Found by Content Polisher |
|---|---|
| Double spaces | ✓ safe fix |
| Space before a comma or period | ✓ safe fix |
Missing space after punctuation (end.Next) | ✓ safe fix or suggestion |
-- instead of a dash | ✓ |
| Empty paragraphs and empty paragraph blocks | ✓ safe fix |
Double <br> line breaks | ✓ suggestion |
Straight quotes, ... instead of an ellipsis, empty bold tags | ✓ with Pro |
| Inline styles, fonts, fake headings, hotlinked images | — fix these in the editor |
Every issue comes with a Before / After preview, only the text between tags is changed, and each fix can be undone from History. For a site with lots of imported content, bulk cleanup in Pro applies every safe fix in one operation.