Back to Blog
tutorial
February 20, 2025
5 min read

How to Preserve Word Formatting When Publishing to WordPress

N
Nagaraj Dev
Plugin Developer & Creator

The "Paste from Word" button was a staple of the old WordPress Classic Editor. But even then, it was hit-or-miss. With the move to the Gutenberg Block Editor, the challenge has only grown.

Why formatting breaks in copy-paste

When you paste from Word, the browser tries to translate Word's internal styling (MsoNormal classes, etc.) into web-safe HTML. WordPress then tries to "sanitize" that HTML. In this double-translation, things get lost:

  1. Mso Classes: Word adds proprietary CSS that browsers don't understand.
  2. Image Paths: Images in Word are local objects; pasting them just inserts a reference that doesn't point to an online file.
  3. Nested Structures: Word's way of handling nested lists is different from standard HTML, leading to broken indentations.

Using DocxToWP for 100% fidelity

DocxToWP avoids the clipboard entirely. By reading the .docx file directly on the server, we can map Word's internal XML structure to clean WordPress blocks.

  • H1–H6: Correctly identified and mapped to Heading blocks.
  • Lists: Correctly nested as List blocks.
  • Emphasis: Bold, italic, and underline are preserved using clean semantic tags.
  • Tables: Converted to Table blocks with alignment and header rows intact.

For best results, use standard Word styles (Heading 1, Heading 2, etc.) rather than just increasing the font size manually.

Perfect formatting every time

Stop fixing headers. Upload your doc and see the magic.

Try DocxToWP

Related Articles

Start publishing Word docs to WordPress in under 60 seconds

Free. No account. No credit card. Install directly from WordPress.org and transform your content workflow today.