EditMyHTML

Paste Word text into HTML and check formatting

Copying from Word can put font sizes, colors and other formatting on the clipboard along with the text. EditMyHTML provides two separate paste options so you can choose which types of formatting to keep.

Open the free HTML text editor

Why pasting can add extra HTML code

Word describes a document's appearance differently from a website. Copying can create extra <span> elements and style attributes, for example. The clipboard content actually available depends on Word, your browser and how you copy. The examples on this page show typical structures, not guaranteed output from every Word version.

The two paste options

Keep formatting
Controls whether bold, italic, headings, lists and links are retained. Disable this option if you do not want to keep this formatting from the source.
Keep font styling
Controls the font, font size and text color. These details are separate from the content's structure.

For text that should adapt to your website's design, keeping content formatting while disabling font styling can be useful. To paste plain text, turn both options off. Check the switches before pasting; toggling them is not a general cleanup of an existing document after the fact.

Example: keep emphasis, leave out font styling

A simplified rich-text fragment might look like this:

<p><span style="font-family:Calibri;font-size:16pt;color:#335577">Our <strong>new course</strong> starts in May.</span></p>

The intended simplified result with formatting kept and font styling disabled:

<p>Our <strong>new course</strong> starts in May.</p>

The emphasis has a content-related purpose and is retained in this example. The copied font styling is not needed. The exact HTML syntax may vary with the source content.

Example: paste only the text

If you do not need the source formatting, the intended visible result is:

Our new course starts in May.

The original emphasis is then no longer part of the pasted formatting. Paragraph breaks and surrounding HTML structure may depend on the insertion point. Check the generated code on the left rather than assuming a particular character sequence.

Practical workflow

  1. Back up the current editor content before replacing or adding to it.
  2. Set both paste options to match your intended result.
  3. Paste the copied Word text into the TEXT view. The left pane is intended for HTML source code.
  4. Check paragraphs, headings, emphasis, lists and links.
  5. Use “Check HTML”, then check the output in the target system.

Limits of cleanup

EditMyHTML is not a Word file converter and does not promise to fully reconstruct tables, document layouts or every special Office format. The browser must provide the required clipboard content. Keep source formatting as simple as possible and use your website's styles for the final appearance.

Non-breaking and repeated spaces in visible text are cleaned up automatically. If fixed word spacing or non-breaking number–unit pairs matter, check those locations separately. Byte-for-byte preservation of the original Word HTML is not guaranteed for newly pasted rich text.