Remove Text Formatting When Copying-and-Pasting

Have you ever copied some text from a web page or a document and then wanted to paste it as simple text into another application without getting all the formatting from the original source? It can be a problem. Simple copying-and-pasting of formatted text often inserts extra “garbage characters” into the output. In fact, there is a simple solution. Simple, that is, if you know about it.

The problem arises when copying and pasting formatted text from one application to another. It doesn’t always work as you’d expect. For instance, you might copy a few lines from a web page and then want to paste it to Facebook. Surprise! All sorts of “unwanted characters” may appear. The same might happen if you are copying text from a word processing document or from a PDF file and you wish to paste it into an email message.

The unwanted characters typically are formatting commands built into the originating program. The problem is that not all programs use the same formatting commands. For example, what might be a command to “use bold text” in one program could insert curly braces {} into the receiving program.

If you search online, you will find a number of programs that will strip out formatting commands from text. One popular program for Windows users is called PureText and can be found at While somewhat simple to use, I would suggest that even this program is unnecessary. There is a simpler solution that works well on all operating systems. You probably already have everything you need installed on your computer right now.

All you need is a super dumb ASCII text editor. In this case, the dumber, the better. If your present text editor has commands to use bold, italics, underline, or various fonts, it isn’t dumb enough. A “dumb” ASCII text editor doesn’t know what formatting commands are, so it ignores all formatting and automatically strips out any formatting commands in the text. Once the text has been “sanitized” with the extra characters stripped out, it can safely be copied-and-pasted elsewhere.

Whether or not you realize it, you probably already have a super-dumb ASCII text editor installed in your computer.


The dumbest ASCII text editor I have ever seen is Windows Notepad. In this case, that’s a good thing. We want it to be unintelligent and unable to add any new commands. There are dozens of ASCII text editors available for Windows, but Notepad is my favorite when stripping out unwanted stuff. Notepad is already installed on every Windows computer.

For the rest of this article, I suggest Windows users should be using Windows Notepad as their “text sanitizer.”


Macintosh systems contain more editing and formatting tools than do Windows systems. In this case, that is a bad thing. Every Macintosh system built in recent years has TextEdit included at no extra cost. TextEdit can be used to strip out formatting, especially if you avoid Styles and other commands. However, it isn’t a true “dumb” text editor as it has some intelligence. You can use TextEdit to strip out formatting, but I suspect you will find it to be a frustrating exercise. There are better tools available.

My favorite Macintosh dumb ASCII text editor is TextWrangler. To be sure, this sophisticated program has a lot of features, but text formatting isn’t one of them! If you switch to TextWrangler, I bet you will never go back to TextEdit.

TextWrangler is a free program that can be downloaded from the Apple App Store or from Bare Bones Software at

For the remainder of this article, everything I write applies equally to Windows NotePad and to TextWrangler on a Macintosh. You can find other simple text editors for Windows or for Macintosh, but the two I mentioned are simple to use, free, and work well for me.

All Operating Systems

First, find the text you wish to copy. Highlight that text, and then use Control-C to copy that text to the operating system’s Clipboard (Mac owners will use Command-C).

Switch to NotePad or to TextWrangler.

Paste your text into the text editor by using Control-V (Mac owners will use Command-V).

Note that the text you want has been pasted into NotePad/TextWrangler without formatting. You have already achieved the goal!

Next, in NotePad or TextWrangler, highlight the text again, and copy it to the Clipboard by using Control-C again (Mac owners will use Command-C).

Now switch to the program where you want to use the final text, and place your cursor into the desired place of insertion. Then press Control-V (Mac owners will use Command-V). Your text, without formatting, is now inserted into the final place you want. You are done.

Simple, eh?

Here are a few other notes:

1. If you wish to copy EVERYTHING on a page, use Control-A (Mac owners will use Command-A) to highlight ALL text, then use Control-C/Command-C.

2. You can also use the pulldown menus in most programs to do the same thing. In the menus, click on EDIT and then on CUT, COPY, SELECT ALL, or PASTE, as needed.

3. However, I would suggest it is easier and much faster to simply memorize the keyboard shortcuts: X to cut, C to copy, V to paste, and A to select “All.”

You don’t need any fancy programs to strip out formatting. You already have everything you need.

“Programs? We don’t need no stinking programs! We’ve got dumb editors!”


Most software has a Paste Special option: Paste > Paste Special > Unformatted text. It requires no special or extra software to work. Simple.


This is great help! Could you address a simple way to cut and paste from a pdf file and convert the text unformatted to a word file? When I paste pdf text to word, I end up with short paragraph that does not fill the space available and I manually fix it. There must be an easier way?


    Mr. Sissman,
    I downloaded PDFX-Change, a free application that enables you to cut and paste text. It’s excellent, works very well.


    Yes, there is an easier way, although it involves learning to use “regular expressions”.

    Your short paragraphs are caused by a hard line break at the end of each line. You can re-assemble the paragraph by manually deleting the line breaks, but this is very tedious.

    A better way is to get a text editor that recognizes regular expressions (“regex”), such as UltraEdit or Sublime Text. A small investment in learning will pay you back with power and wizardry!

    To strip the line breaks in your example, simply turn on the regular expression feature in your editor, do a search for all “\r\n”, and replace with a blank. This will cause the lines to re-assemble into a paragraph. “\r\n” is regex-speak for “carriage return” (‘\’ is the escape code) and “line feed”, which terminate every line in a text file.

    In regex, ‘^’ is the beginning of a line; ‘$’ is the end of a line. The asterisk ‘*’ means repeat the preceding character.

    So, doing a search for ” *$” and replacing with “” (nothing), will strip all the trailing blanks in all the lines of a file. “^ *” means all the leading blanks.

    There a books written on regex, but you can do useful stuff with just a few notions.

    Liked by 1 person

    I don’t know it this is useful, but I press Control F, then press ‘replace.’ If I want to remove spaces I count them (say 5 spaces) and just put 5 spaces on the top line, leave the bottom empty and press replace. Likewise if there are a lot of page breaks I go to the bottom of ‘replace’ and press ‘more’ then select ‘special.’ The top one is line break, so I put 1 of those and leave the bottom with just one space. That knits the words together leaving a small gap. If you don’t like the changes just press control Z. I suppose this is baby stuff, but it works for me. I just wish I knew how to copy a PDF page exactly to a word doc without altering it’s exact format (for legal work). That would be something!


I usually use Notepad exactly as you described for copying/pasting monthly meeting minutes (prepared in a different software program and received via email) into a Word document. This morning I tested the Paste Special technique that was suggested in the previous comment. Although formatting was removed, each line of the text was treated as a separate paragraph, so there was a line break at the end of each line, as well as a line of space between lines. It’s not difficult to clean up (just insert your cursor at the end of each line and then hit “delete” twice), but it’s certainly much more tedious.


    I agree with susan as much as you think it is simple , there is a lot of work if you are doing a many pages work and you have to delete the empty spaces at the end of each line


Humphrey, thanks for your recommendation. I use Paste Special all the time with Excel. I’ve been stripping out any invisible code with Notepad for a while now. I do a lot of work in Publisher, often have to cut and paste stuff from web sites, Word docs, Excel, etc. I want to make sure there’s no underlying code so I cut and paste into Notepad, then into Pubby. Never thought to use Paste Special (du-uh). I just tried it and it works like a champ. The only odd thing is that I have to use the Edit > Paste Special menu instead of right clicking to paste. For some reason Paste Special doesn’t appear on the menu when I right click.

This will save me a lot of time, even using the menu.


I would like to find an easy way of removing tabs which these dumb text editors keep in.


Like Humphrey, I have always used Paste Special>Unformatted text. As he says it is really simple. I fear that using additional software is very confusing for those with limited experience and always recommend this Paste Special method to my students.


Thanks for the tip about TextWrangler. I knew about the trick you describe and have used TextEdit but it is always nice to have another program in the event that TextEdit doesn’t produce the desired effect!


In Linux/KDE there is Kate. While not particularly a “dumb editor” it does strip out garbage.

It is also usefull for striping out all the extra, unwanted, HTML from documents created by programs like Word when saving as a web page. But, you have to be able to read and understand HTML.


Some Macintosh programmes also have “Paste as Plain Text” or something similar that strips out all the formatting during the paste operation from the clipboard to where you’re pasting it – e.g. in Reunion for Macintosh it is Command-Option-v, in other applications it can be Command-Shift-Option-v



Instead of the control commands, I right click and hit copy and then paste. Should it work the same as using the control commands?


    They are the same. A third method is to use the pull-down menus. Click on EDIT along the top of the window, then select COPY or SELECT ALL or PASTE. All three methods provide the same results.


There is an easier way requiring no special items. Most but not absolutely all text programs, in coding, attach the formatting data to the end, e.g. what you and I observe as the paragraph symbol. If you don’t want to take the formatting with you to the paste destination, simply make sure that you copy only the text but not the paragraph symbol. Again, for most but not absolutely all text programs, the pasted text will adopt the formatting already set for the paragraph it is being pasted into. (I am not a programmer; I just learned this many years ago by the trial and error method.)


When using an iPad, mor or less the same thing can be done using the “Notes” app, by copying the desired text into a new note and then recopying it into the body of your email (or whatever), except the “Notes” app will automatically turn any URLs you may copy into hyperlinks.


Real programmers don’t use word processors – they use line editors.


To get rid of line breaks, I use a method that is a bit easier than deleting each one. I add a character such as “>” to the end of each paragraph, then use “edit” and do a search and replace on the paragraph mark. If I need to add a space, I use that in the replace box. Then I search on my “>” and replace it with a new paragraph mark.

Some of the methods above sound interesting and I will be trying them too.


Try CTRL + ALT + V to paste unformatted text. Works in all Microsoft apps, at least.


    I recently discovered Word and Publisher leave underlying “stuff” in their wake. I now wash everything by cutting and pasting it into Notepad before I paste it into my final document, but I’ll try this CTRL/ALT/V.


thank you so much! saved me so much time!


What about iOS users – iPad etc. same issues exist!


I second the comments of Glen Horn. The coding crap still shows up in notepad. This does not work.


OR try this and save yourself much aggravation


Wow, I want to think you for sharing this quick and easy to understand fix. You’ve saved me a lot of time, I’ve learned something, and after this acknowledgment there’s still time saved (to work on my project).


I tried copying a picture from google images and there was a line either beside the picture or underneath. How can I remove this line?


    You would not use this method described in the above article for copying-and-pasting pictures. It is used only for copying-and-pasting text. For pictures, I normally right-click on the picture and then select from the menu that appears: copy picture, save as… or other options.


All of these are useful functions for stripping but what if someone wanted to “add”? Is there any way to “add” a couple of ‘s to every pasted item such that it ends up as double-spaced when pasted as text? Even if I had to create a macro to enable a “paste++” option by hotkey it would be extremely helpful to me.


    Use an editor that supports “regular expressions”, like UltraEdit or Sublime Text.
    To double-space lines, replace all “\r\n” with “\r\n\r\n” (Carriage Return – Line Feed).
    MS Word can also replace paragraph marks with two paragraph marks.


Anyone know of a free texteditor that will strip all tags before pasting into a
I have tried tinyMCE and disallowed many tags.. one problem is that I’d like users to be able to intentionally format a text block but I need to eliminate random tag garbage (eg wiki-tags!)
I also tried:
$edit = false;
if ( isset($_GET[‘edit’]) && $_GET[‘edit’] != ” ) {
$edit = true;
$edit_id = preg_replace(‘#([\D]+)#’, ”, $_GET[‘edit’]);
$edit_query = mysql_query(“SELECT * from `MySQLtableName` where `id` = $edit_id”);
$edit_array = mysql_fetch_assoc($edit_query);
if($edit_array==”) {$_POST[‘textareaName’]=strip_tags($_esc[‘dbFieldName’]);}
else {$_POST[‘textareaName’]=$dbTable_edit_array;}


I use “”… easy-peasy.


My book text was wrongly formatted by a publisher when they read W.P.S. as Word Perfect. This caused all sorts of errors which they now deny. If they changed it back to the original text I have been advised that the errors will still remain. Is this true and can you offer any advice please?


    —> If they changed it back to the original text I have been advised that the errors will still remain. Is this true and can you offer any advice please?

    The article above describes how to remove ALL text formatting as well as pictures and other graphics, leaving behind pure ASCII text. (No bold, no underlining, no images, and so on.) I don’t think that is what you want.

    I assume you kept a copy of your original document as it existed BEFORE you sent it to the publisher? If so, use that.


Sadly, Notepad in Windows 10 is apparently not dumb enough anymore. So I went with PureText, thanks for the tip.


    I use Copy Plain Text2, an extension on Firefox that copies text from the web with no formatting. I need to see if it’s available for Chrome. When I copy stuff in Chrome to Word I use the Special Paste unformatted option. Works fine. I haven’t had to try that with any other software, though.


My quick and dirty solution is to copy my text, click on the browser search bar to highlight the URL, paste the copied text over the top of the URL. Select the text again, copy and paste into the document. Voila, all line breaks are removed . (Works well unless you want to keep special formatting like italics, it removes all of that).


Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

You may use these HTML tags and attributes:

<a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: