About the Words to Number Converter
This does the reverse of spelling a number out: it reads a number written in English words and turns it into digits — so "one thousand two hundred thirty-four" becomes 1,234. It's handy for transcribing amounts from a document, cheque or dictation into a form or spreadsheet, checking your own written-out figures, or processing text where numbers appear as words. Whether you call it words to number or a word-to-digit converter, it turns the written form into figures.
How it works
The words are tokenised and each is mapped to a value. Small words (one to ninety-nine) accumulate, "hundred" multiplies the current group by 100, and scale words (thousand, million, billion, trillion) close off a group and add it to the running total. So "two hundred thousand" is (2 × 100) × 1000 = 200,000. The word "and" and hyphens are ignored, "point" starts a decimal read digit by digit, and "negative" or "minus" makes it negative.
Assumptions and behaviour
- Understands the short scale (thousand, million, billion, trillion) and both plain and hyphenated forms (twenty-one or twenty one).
- "and" is ignored, so both the British "one hundred and five" and American "one hundred five" work.
- "point" reads following words as individual digits (point five six → .56).
- Commas and extra spaces are ignored; input is case-insensitive.
Limitations
- It expects standard cardinal number words. Ordinals (first, second), fractions in words ("a half", "three quarters") and informal quantities ("a couple", "a dozen") aren't parsed. The "hundreds" shorthand does work — "twelve hundred" gives 1,200 — but a stray unrecognised word makes it flag the input.
- Any unrecognised word causes it to flag the input rather than guess.
- After "point," only single-digit words (zero to nine) are read; multi-digit words there aren't valid.
- English only.
Privacy
The conversion runs entirely in your browser. Nothing is uploaded or stored.

