While some writing and text apps have native word and character counters as part of their built-in feature set, not every app does. That can be changed easily though by creating a Mac OS X Service that will provide word counts and character counts from just about anywhere on a Mac that text is selectable. This means apps like TextEdit, the Quick Look preview panels, and even web browsers like Safari, Chrome, Firefox, all will gain the word/character counting feature that is easily accessible from a right-click. This is probably the best method of gaining a word counter into Mac apps that don’t support the feature natively.



A Mac OS X Service is created using the scripting app Automator, bundled in all versions of Mac OS X. If you’re new to Automator and the idea of scripting sounds overwhelming, don’t worry, this is a extremely simple to set up, uses prewritten code, and requires no specific ability to write scripts.

How to Make the Word & Character Counting Service for Mac in Automator

We’re going to create an Automator Service using an AppleScript created by a user named ‘nslater‘ on Github. It’s already short and concise and thus there’s no need to reinvent the wheel or rewrite it ourselves.

Launch the Automator app, found in the /Applications/ folder of Mac OS X (or open it with Spotlight / Launchpad Select “Service” at the splash screen of Automator Select into the search box on the left side of the Automator window, and type “run applescript”, then drag and drop that action into the right side window Copy and paste the following AppleScript code from GitHub into the “Run AppleScript” form: on run {input, parameters}

tell application "System Events"

set _appname to name of first process whose frontmost is true

end tell

set word_count to count words of (input as string)

set character_count to count characters of (input as string)

tell application _appname

display alert "" & word_count & " words, " & character_count & " characters"

end tell

return input

end run

Save the service and name it something fairly short, like “Count Characters & Words”

Now that you’ve created the service and saved it, let’s test it out to make sure it works. There shouldn’t be any issues, but if you encounter any error it’s likely because the copying and pasting of the above code went wrong with character translation, thus you may want to try copying the code directly from the GitHub page of nslater if it isn’t running properly.

How to Use the Word & Character Counting Service in any Mac OS X App

Now that the service has been created, you can use it just about anywhere in Mac OS X that text or words are selectable. This doesn’t have to be a text editor or entry field, it can be raw text in non editable documents, web pages, or Quick Look windows, the only necessity is that the text is selectable. Here’s how it works:

Launch a text file in an app like TextEdit Either select all the text, or just a sample of the text, and right-click (control+click) the mouse button Go to the “Services” menu and choose the ‘Count Characters & Words’ option Find the word and character count of the selected text in a popup window like so

Now that you’ve confirmed the word counter service to be functioning as intended, you can go ahead and quit out of Automator. The Service will remain intact.

The Service should carry over immediately to all apps through Mac OS X, but you may want to relaunch some apps if you don’t see the character and word counter option available in the Services menu. (side note: you can also use Terminal to killall SystemServices but that can have unintended side effects, thus we won’t specifically recommend it).

If you decide you don’t want this service, you can easily remove it and others from the Services menu of Mac OS X by heading over to an unlikely place in System Preferences.