Skip to content
ToolZone

Words to Number

Convert a written-out number, such as 'four hundred and fifty-two', back into its numeric digit form, useful for parsing text-based data.

Runs in your browser. Nothing you enter or upload leaves your device.

Understands “and”, hyphens (twenty-one), “a hundred”, minus/negative, digits mixed with words (5 million), and scales up to trillion.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Words to Number

Words to Number does the reverse of spelling out a number: type something like "four thousand two hundred seventeen" and get 4,217. It is useful for checking a written amount on a contract or check, for students practicing place value, and for anyone transcribing numbers that were dictated or written out in full.

How it works

The text is lowercased, every character other than letters and spaces is removed, and the rest is split into words. Each word is looked up in a vocabulary of zero through nineteen and the tens from twenty to ninety. Those values are added to a running group total, so "seventy five" becomes 75.

Scale words multiply. "Hundred" multiplies the current group by 100. "Thousand", "million", and "billion" multiply the group by their size and then move it into the grand total, starting a new group. For "two million three hundred thousand", that gives 2 x 1,000,000, then 3 x 100 x 1,000, for 2,300,000. A scale word with nothing before it counts as one, so "thousand" alone is 1,000. Any word outside the vocabulary stops the conversion and is reported.

How to use

  1. 1

    Type or paste the number into the Number in words field, using spaces between words (for example "forty two").

  2. 2

    Leave out "and" and "a", which are not recognized.

  3. 3

    Read the digits in the result box, or fix the word named in the error message.

  4. 4

    Click the copy button to copy the number without separators.

Worked examples

Basic conversion

Checking a three-digit number.

Input
one hundred twenty three
Result
123

Millions with a hundreds group

Verifying a written contract amount.

Input
two million three hundred thousand
Result
2,300,000

Full value with every group

A long amount from a legal document.

Input
four billion seven hundred eighty million five thousand nine
Result
4,780,005,009

Unrecognized word

Using British style with "and".

Input
one hundred and five
Result
Unknown word: "and"

Remove "and" to get 105.

Limitations
Hyphenated words are not split, so "twenty-one" returns an unknown-word error; use spaces instead. Only cardinal words up to billion are recognized: no trillion, ordinals (third), decimals, fractions, "negative", or "and". Informal phrases like "twenty twenty four" are summed (44) rather than read as a year, and grammar isn't validated, so odd orders still return a number.
Assumptions
Input is standard American English using short-scale names (billion = 1,000,000,000).
Privacy
Conversion happens in your browser and the text you enter is not stored or sent anywhere.

Frequently asked questions

Does this handle different phrasing styles?+

Partly. Spacing, capitalization, and punctuation don't matter, and colloquial forms like "nineteen hundred" give 1900. However, the word "and" (as in "one hundred and five") is not recognized, so leave it out.

Can this convert ordinal words, like 'third' or 'twenty-first'?+

No. Only cardinal number words are supported. Ordinals such as third or twenty-first return an unknown-word message.

Why does "twenty-one" show an error?+

The hyphen is stripped without adding a space, so the tool sees "twentyone", which isn't in its vocabulary. Type "twenty one" with a space instead.

What is the largest number it can read?+

Billion is the largest scale word, so you can enter values up to the hundreds of billions, such as "nine hundred ninety nine billion".

Can I convert decimals or money amounts with cents?+

No. Words like "point" or "cents" aren't recognized. Convert the whole-number part and handle the decimal separately.

Related tools