Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
Rich Text to Markdown guide

Clean Up Formatting Junk From Pasted Text

mso- styles, empty spans, non-breaking spaces, zero-width characters, and stray blank lines all ride along in a rich-text paste. Here is what the tool removes and what it keeps.

Direct answer

A rich-text paste carries markup that means nothing in Markdown: Office <o:p> tags and namespace elements, mso- style declarations, Mso classes, conditional comments, style and class attributes, empty spans and paragraphs, non-breaking spaces, zero-width characters, and soft hyphens. The tool removes all of them before conversion, then optionally collapses runs of blank lines. Words, headings, lists, links, and tables are untouched.

Open the Rich Text to Markdown converter

When to use this

  • Converted output is peppered with stray HTML tags or attribute leftovers.
  • Text has gaps that no amount of editing seems to remove — usually non-breaking or zero-width spaces.
  • Every second line in the output is blank.

Steps

  1. Paste the content into the box above; the cleanup runs automatically on every paste.
  2. Leave 'Clean up extra blank lines' on to collapse three or more newlines into a single blank line.
  3. Turn that toggle off and paste again when the blank lines are meaningful, such as in poetry or in preformatted text.
  4. Fix anything left over directly in the output box, which stays editable.
  5. Copy the Markdown, or download it as a .md file.

Example conversion

Pasted source
<p class="MsoNormal" style="mso-line-height:115%"><span style="font-size:11pt">Ship <b>Thursday</b>.</span><o:p></o:p></p>
Markdown output
Ship **Thursday**.

Common mistakes

  • Do not use this to remove Markdown syntax from text. It produces Markdown; use the Markdown to Text tool for the opposite job.
  • Do not expect it to fix bad source structure. If the original used bold instead of real headings, the output has bold instead of headings.
  • Do not toggle the blank-line option and expect the current output to change. The toggle applies to the next paste.
  • Do not paste plain text and expect cleanup of quote bars or ANSI codes; use the Clean Pasted Text tool for that class of junk.

FAQ

What is mso- in pasted text?
It is the prefix for Microsoft Office's proprietary CSS declarations, such as mso-line-height and mso-pagination. They only mean something inside Office and are removed here.
What is a zero-width space?
An invisible character (U+200B and its neighbours) that some editors insert for line-breaking control. It survives copy and paste and can break search, diffs, and code. The tool removes it along with joiners, byte-order marks, and soft hyphens.
Does the cleanup change my words?
No. Every rule targets markup, invisible characters, or blank lines. Visible text, headings, lists, links, and tables are preserved.

Related paste-to-Markdown guides