Strip markup from macOS clipboard and return as plain text with a shortcut key

Would you like to copy and paste text without formatting? This article shows you how to create a service with Automator to convert the text on the clipboard to plain text by using a global shortcut key.

Here’s an example of default copy/paste behaviour in Powerpoint on the Mac. Notice how the first text field has the Comic Sans font and the second field the Monaco font.

Copy text

Paste text

As you see, both the text and the markup (font etc.) has been copied. The second field now also has the Comic Sans font. If you just want to copy the text (plain text), you can either choose Paste Special or use a plain text editor to strip the text from its layout. After pasting the text, the monaco font in the second field would still be there and it would look like this:

Paste text

Convert to plain text

Some macOS apps have support for Paste and Match Style and some apps support things like Paste special. I wanted a solution that works the same in every app and without using secondary app. I found this command you can run in the terminal:

pbpaste | pbcopy

Step by step solution

Here are all the steps necessary to convert the text on the clipboard to plain text with the press of a hotkey.

new quick action

shell script

fill in

save action

powerpoint

add keyboard

And that’s it! Copy text from any app you like. + v will paste it like always. And if you want to strip the markup, press + [ before pasting.

Grüsse aus Berlin!
Loek