Martech Zone Apps
App: Word Counter, Sentence Counter, and Character Counter (Removing HTML)
If you’re reading this article in our email or feed, you will need to click through to the page to use the app.
As with many of our Martech Zone Apps, I keep finding new tools that I need when I’m working with our clients. Whether it’s ensuring titles and meta descriptions are the correct lengths, or I’m trying to see how many characters I’m limited to when passing data, I’m often searching for and finding a word count or character count engine online.
It’s a dead simple script to write, so I wanted to share it here along with the sentence count as well! A couple of improvements I made to this were:
- Trimmed the source text for leading and trailing spaces.
- Ensure that every sentence has a space after it.
- Removed extra spaces between words and sentences.
- Removed any HTML.
Hope you find this helpful, let me know if there are any improvements that you would like.