How to count words and convert text case
These text tools combine three everyday utilities. Word Count gives live statistics for any text — words, characters with and without spaces, lines, sentences, paragraphs, average word length and estimated reading time. Case Transform converts text between eleven cases including camelCase, snake_case, kebab-case and CONSTANT_CASE. Clean / Trim applies one-click fixes such as removing blank or duplicate lines, sorting lines, trimming whitespace and normalising line endings, plus find-and-replace.
Everything runs in your browser, so it's safe for drafts, private notes and data exports.
Counting words and characters
Paste text into the Word Count tab and the statistics update as you type. Character counts matter for meta descriptions (around 155–160 characters before search engines truncate), commit message subjects (50 characters is the common convention), SMS (160 GSM-7 characters per segment) and form fields with a maxlength. Reading time is estimated at a typical silent-reading pace of about 200 words per minute.
Converting between naming conventions
Programming languages and tools each have their preferred naming style. Converting user account id gives:
| Case | Result | Where it's used |
|---|---|---|
| camelCase | userAccountId | JavaScript/TypeScript variables, JSON keys, Java methods |
| PascalCase | UserAccountId | Classes, React components, C# methods, Go exported names |
| snake_case | user_account_id | Python, Ruby, SQL columns, Rust variables |
| kebab-case | user-account-id | URLs, CSS classes, CLI flags, file names |
| CONST_CASE | USER_ACCOUNT_ID | Constants and environment variables |
| dot.case | user.account.id | Config keys, i18n message IDs, Java packages |
| slug-case | user-account-id | URL slugs — also strips accents (café → cafe) |
| Title Case | User Account Id | Headings and labels |
UPPERCASE, lowercase, iNVERT and aLtErNaTe are also available. Converting to camelCase or snake_case treats any run of spaces, hyphens, underscores or punctuation as a word boundary, so user-account_id, User Account ID and user.account.id all convert cleanly.
Converting from camelCase (e.g. userAccountId → user_account_id) isn't split automatically, because there are no separators to detect. Insert spaces first, or use find-and-replace.
Cleaning up text
- Trim leading and/or trailing spaces on every line, collapse repeated spaces, or remove all whitespace.
- Normalise line endings to LF — useful when a file from Windows (CRLF) causes noisy Git diffs or breaks a shell script.
- Remove blank lines or duplicate lines to clean up lists of IDs, emails or log entries.
- Sort lines A→Z or Z→A (locale-aware), reverse their order, or add line numbers.
- Remove punctuation, digits or letters, and convert tabs to two spaces or back.
- Find and replace across the whole text.
Need pattern-based replacement? Use the regex tester to build the pattern first. Writing a longer document? Try the Markdown editor.
The same operations on the command line
When the text is a large file or part of a script, the classic Unix tools do the same jobs. These are handy to keep next to the browser tool:
wc -w notes.txt # count words (wc -l: lines, wc -m: characters)
sort -u emails.txt # sort and remove duplicate lines
awk '!seen[$0]++' list.txt # remove duplicates, keep original order
grep -v '^\s*$' file.txt # drop blank lines
tr '[:lower:]' '[:upper:]' < in.txt # uppercase
sed 's/\r$//' windows.txt # convert CRLF line endings to LFThe browser version is quicker for one-off edits and works the same on any operating system, including Windows machines without a Unix shell.
Frequently asked questions
How are words counted?
Words are runs of non-whitespace characters separated by spaces, tabs or line breaks, so don't and e-mail each count as one word.
Does the character count include spaces?
Both are shown: total characters including spaces, and characters excluding spaces.
What's the difference between kebab-case and slug-case?
Both join lowercase words with hyphens. Slug-case additionally strips accents and diacritics (Crème brûlée → creme-brulee) so the result is safe in URLs.
Is my text stored anywhere?
Only in your browser's local history panel, which you can clear. Nothing is sent to a server.