ForHosting KIT · Text & AI

Count vowels and consonants

“Hello World 123!” splits into 3 vowels, 7 consonants, 3 digits and 3 other characters, 16 in all. Only a, e, i, o and u count as vowels, so y stays a consonant. Handy for phonics drills, spelling lists and puzzles. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
Hello World 123!
You get
Total
16
Vowels
3
Consonants
7
Digits
3

This vowel and consonant counter measures any non-empty text string and returns four integer tallies at once: how many characters are vowels (a, e, i, o, and u in either case), how many are consonants (the other ASCII letters), how many are digits from zero through nine, and how many fall into everything else, including spaces, punctuation, symbols, and non-ASCII glyphs. The engine is fully deterministic: it walks the string once, classifies each character with fixed ASCII rules, and never calls the network, samples randomness, or depends on the current date.

What the four counts tell you

Vowel and consonant counting answers a focused product question: of the characters in this string, how many are English vowels, how many are other letters, how many are decimal digits, and how many are neither. Vowels here mean the five ASCII letters a, e, i, o, and u, matched case-insensitively, so both Hello and HELLO contribute the same three vowels from e, o, and o.

Consonants are the remaining ASCII letters from A through Z that are not those five vowels, so b, c, d, f, g, and the rest of the alphabet land in the consonant bucket regardless of case. Digits are the ten characters zero through nine; they never count as letters. The other bucket collects spaces, tabs, newlines, punctuation, symbols, emoji, and any non-ASCII letter such as é or ñ, which keeps the rules simple, stable, and free of locale tables that could drift between hosts.

The letter y is treated as a consonant on this page because the classifier is character-level with no word context for deciding when y behaves as a vowel. There is no syllable estimate, no reading-time mode, no silent coercion of null into an empty success, and no language model guessing phonetics.

Where vowel and consonant tallies fit in study, games, and software

Students meet vowel and consonant drills when a phonics worksheet asks how many vowels sit in a sentence, when a spelling list must be split by letter class, or when a coding lab asks for string classification before serialization. Teachers can pre-generate answer keys that show expected vowel and consonant totals without trusting opaque office macros that count y differently or fold accented letters inconsistently.

Puzzle and game authors paste titles, riddles, and grid words into a counter so they know the letter balance of a prompt before publishing a challenge. Developers call the same contract from scripts to validate form fields that require letters, seed deterministic test vectors for string utilities, assert exact class counts in property-based tests, or satisfy programming-challenge statements that demand vowel and consonant figures rather than a hand-waved screenshot. Support and operations teams measure noisy ticket subjects and log lines when a policy needs a quick letter-versus-digit breakdown.

Pair it with character-count, uppercase, or encode tools when you are building a small lab of free, deterministic text helpers for forms, CMS prep, and data hygiene.

Phonics and spelling drills

Check how many vowels and consonants sit in a sentence, word list, or worksheet answer before grading or publishing keys.

Puzzles, games, and form rules

Balance letter classes in riddles and word games, or validate inputs that must contain letters, digits, or mixed content.

What does the vowel and consonant counter cost?

It is free in your browser on this page.

Which letters count as vowels?

Only the five ASCII letters a, e, i, o, and u, matched case-insensitively. The letter y is counted as a consonant.

What goes into the other tally?

Spaces, punctuation, symbols, emoji, and any non-ASCII character (including accented letters such as é) are counted as other.

What happens if the text is empty?

Provide a non-empty string; blank submits are not treated as a successful zero count.

Does this tool count syllables or reading time?

No. It only returns integer tallies for vowels, consonants, digits, other, and total length. Use dedicated tools if you need those metrics.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/str/count-vowels

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/str/count-vowels \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello World 123!"}'
{
  "text": "Hello World 123!"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "str.count_vowels",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_chars100000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Empty input is rejected with a clear invalid_input error so a blank form field cannot become a silent zero success. Use it free in the browser for homework, puzzles, and quick audits, or call the API at $0.002 per successful request when you need reproducible tallies in CI, tutoring software, or teaching demos.

What vowel and consonant counting means and what the response contains

This calculator returns the echoed text, the four tallies vowels, consonants, digits, and other, a total equal to the string length, and the fixed method tag count_vowels for logs and multi-tool pipelines. The engine either builds exact integer metrics inside the supported length or rejects the request with invalid_input. Rejected cases include a missing text field, a null value, an empty string, objects and arrays that are not plain text, and any payload longer than the documented maximum character count.

How the text field is read and how tallies stay reproducible

The value must be a non-empty string; finite numbers and bigints are stringified first so a bare product code typed as a number still produces a stable digit string to classify. Classification uses a single linear pass with fixed ASCII membership tests—no network dictionary, no machine-learning model, and no locale-aware case folding beyond mapping A through Z to a through z for the vowel check. The preferred field is text, but aliases input, string, value, content, and s are accepted so query strings, spreadsheets, and typed forms can reuse the same contract without renaming columns. Booleans, plain objects, and arrays are rejected with a clear message so a mistaken JSON body does not become the word true or an unhelpful object dump. Empty string is always invalid_input: the product promise is count vowels and consonants in text, not invent a zero success for a blank submit. Length is capped at one hundred thousand characters so a runaway paste cannot monopolize a Worker; longer payloads fail with an explicit limit message rather than a truncated silent cut. Pair the free browser run on this page with the priced API when you need the identical tallies inside an automated pipeline without shipping your own classifiers.

Where vowel and consonant tallies fit in study, games, and software

On this page the work runs entirely in your browser; through the API each successful count costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the numeric result.

Deterministic test fixtures

Generate reproducible vowels, consonants, digits, and other tallies for unit tests, goldens, and CI assertions.

Read the full KIT documentation →