How to Remove Unwanted Formatting from Text

toggle-button

The problem

If you've copied text from a webpage or a PDF file to an email, you've encountered the problem associated with formatting being copied along with the text. The result can look very strange indeed, with broken lines and odd fonts.

You've probably also encountered a similar problem when you copied an email reply into another document. All those crazy >>> characters get copied, along with the broken lines and paragraphs as well.

The solution

The good news is that there are several free programs available that allow you to copy the text you want without the unwanted formatting.

One of my favorites is StripMail. It's a little stand-alone program that takes the clipboard contents and converts it into plain text without formatting.

It removes HTML and Word formatting, removes email reply ">" and "|" characters and will optionally remove line feeds so that broken lines are restored into proper paragraphs. At the touch of a button the stripped text is restored to the clipboard, ready for pasting into your document.

It works like a charm. I use it daily and it's one of the most useful utilities on my PC.

The only downside of StripMail is that you have to run the program each time you want to clean some text. I overcome this by assigning a hotkey to run StripMail to automatically strip the clipboard contents ready for pasting. Removing formatting is then as simple as copying the text, hitting the hotkey and pasting.

You can create the hotkey (as I did) by using the freeware program AutoHotkey but you can also do it in Windows by using a shortcut that's linked to a hotkey. Here's how:

  • First download the StripMail program (268KB). Then use Explorer to navigate to your C:\Program files folder. In that folder create a new folder called StripMail by right mouse clicking and selecting Create/New folder. Once the folder is created, move the StripMail program stripmail.exe you downloaded into that folder.
     
  • Open Notepad or some other plain text editor and type in the following line:
    stripmail.exe -d -x
    Save the one-line file as stripmail.bat in c:\Program files\StripMail.

    What we have just created is a batch file that, when run, will open StripMail, clean the contents of the clipboard and then exit the program. Now we have to create a hotkey linked to this batch file so that it runs whenever the hotkey is pressed.
     
  • While in the c:\Program files\StripMail folder, right click your mouse and select Create/New shortcut. In the wizard browse to c:\Program files\Stripmail\stripmail.bat, highlight the file and click OK. In the next screen call the shortcut StripMail. Press OK and exit the wizard.
     
  • Right click on the shortcut icon and select Properties. Click in the Shortcut key box and then press whatever key combination you want to use as a hotkey. I use F10 but you can use whatever keys you like as long as it doesn't conflict with another keyboard shortcut combination you regularly use. Click OK and you are finished.

Now the next time you want to copy text from an email or website, just copy the text as normal, hit F10 or whatever shortcut you used, and paste. Voila, the unwanted formatting has been removed.

Simpler options

If all that sounds too daunting for you, try the program called PureText. It's simpler to setup than StripMail, because you can create your hotkey from within the program and the same hotkey will perform an automatic paste.

On the downside, it only removes formatting and will not remove email ">>" characters or hard line breaks.

Yet another option is to use a web service. I can recommend two sites: TextFixer and Sfu.ca. Both are free.

Finally, here's a way you can remove unwanted formatting from text with Microsoft Word. Highlight the text and press Ctrl + Spacebar. This will automatically convert what's highlighted to plain text formatting. It won't remove those pesky email ">>" characters though. You could use Word Search and Replace but StripMail is probably a better option.

Gizmo

Please rate this article: 

Your rating: None
4.40909
Average: 4.4 (22 votes)