Words → Number
Parse a spelled-out number ('one hundred twenty-three') back to its numeric form.
0 characters
0 characters
About Words → Number
Converts an English-word number back into a numeric value. Useful for parsing user input, processing spoken transcripts, or normalizing values in mixed text. Supports integers up to a trillion and negative numbers.
When to use it
- Parsing numbers from a speech-to-text transcript
- Normalizing 'spelled out' numeric input from users
- Converting bank check amount text back to a number for validation
How it works
The input is tokenized on whitespace, hyphens, and commas. 'And' and the negative marker are recognized. Each token is mapped to a value (ones, tens, hundred, thousand, million, …) and combined according to scale.
Examples
one hundred twenty-three
123
two thousand five hundred
2500
negative forty-two
-42
Frequently asked questions
- Does it handle decimals (e.g. 'three point one four')?
- Not currently. The parser handles integers only. To parse 'point' decimals, post-process the integer and fractional parts separately.
- Are unusual phrasings supported?
- Standard American English number words work. Locale-specific forms ('a hundred', 'half a thousand', 'four score') are not parsed.