Convert numbers written in words into digits

Type a number in words, such as "forty-two" or "three lakh fifty thousand", and the tool writes it in digits. Put one number per line to convert a whole list.

Live demo · real result from this tool

Numbers

1,520 23 3.14 1,984 2,500,000

Table

WordsNumber
one thousand five hundred and twenty1,520
twenty-third23
three point one four3.14
nineteen eighty-four1,984
2.5 million2,500,000

Processed on your device — nothing is uploaded.

How to use words to number

  1. Type or paste into Number in words (one per line). Hyphens, commas and “and” are all fine.
  2. Leave Group thousands with commas ticked for 1,520, or untick it for 1520.
  3. Tick Keep ordinal suffix (21st) if words like “twenty-third” should keep their ending.
  4. One line gives a single Number. Several lines give a Numbers list plus a table that pairs each phrase with its value.

What it does and when to use it

Numbers written out in words appear in contracts, cheques, transcripts and school work. To sort, add or check them you need digits. Converting long ones by hand is error-prone: “nine hundred thousand and nine” is easy to misread. This tool does it in one step and shows each conversion next to its source.

Examples of use:

  • Checking that the amount in words on an invoice or cheque matches the figure.
  • Turning number words from a speech-to-text transcript into data.
  • Marking homework where pupils write numbers in words.

For the reverse, digits to words, use number to words. To pull digits that are already in a text, use the number extractor.

How it works

The phrase is made lowercase, hyphens and commas become spaces, and “and” is dropped. The words are then read from left to right:

  • Units, teens and tens (one to nineteen, twenty to ninety) are added together, so “forty two” is 42.
  • hundred and dozen multiply what came before, so “five hundred” is 500 and “a dozen” is 12.
  • Scale words (thousand, million, billion and up to sextillion, plus lakh and crore) close a group and add it to the total.
  • Pairs like “nineteen eighty-four” are read as spoken years, and single digits in a row (“five five five”) are read digit by digit.
  • Numerals can be mixed in, so “2.5 million” works.
  • “minus” or “negative” at the start makes the number negative, and “point” starts the decimal part.

Ordinal words such as first, twelfth or twentieth are turned back into their base number. The maths uses whole numbers internally, so results are exact. It runs in your browser.

Worked examples

These outputs come from the tool’s own function.

  • one thousand five hundred and twenty gives 1,520.
  • three lakh fifty thousand gives 350,000.
  • twenty-third with Keep ordinal suffix ticked gives 23rd.
  • minus three point one four gives -3.14.
  • five five five one two one two with grouping off gives 5551212, handy for phone numbers read aloud.

Limits and tips

  • Only English number words are understood.
  • Fractions in words (“three quarters”, “half”) are not supported; write them as “zero point seven five”.
  • Currency words such as “dollars” stop the conversion. Delete them first.
  • A scale word after the decimal digits applies to the whole number, so “two point five million” gives 2,500,000, the same as “2.5 million”.

Frequently asked questions

Does it understand Indian numbering such as lakh and crore?
Yes. One lakh is 100,000 and one crore is 10,000,000, so "three lakh fifty thousand" gives 350,000 and "two crore" gives 20,000,000. The digits are grouped in threes, not in the Indian style.
How large a number can it convert?
The scale words go up to sextillion (10 to the power 21). The arithmetic uses whole-number maths with no rounding, so "nine hundred ninety-nine trillion nine hundred ninety-nine billion" comes out exact.
How do I write decimals?
Use "point" followed by single digits, such as "three point one four" for 3.14. "One point twenty five" is rejected, because after "point" each digit must be said on its own, as in "one point two five".
Why does "nineteen eighty-four" show as 1,984?
Spoken years are read correctly as 1984, but thousand grouping is on by default. Untick "Group thousands with commas" to get 1984.
What happens with a word it does not know?
The line shows "Could not read" and names the word, for example "apples" in "forty-two apples". Other lines in the list still convert.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close