Number to Words

Convert numeric digits to English cardinal number words with proper formatting.

Back to all tools on ToolForge

More in Text Tools

Input Number

Output

About Number to Words

This tool converts numeric digits to English cardinal number words using standard American English formatting. The conversion handles numbers from zero to 999,999,999,999 (999 billion) with proper hyphenation for compound numbers and correct grouping by thousands.

It is useful for writing checks and financial documents, legal contracts and agreements, formal writing and invitations, educational materials for teaching number names, accessibility applications for screen readers, and data validation for numeric fields.

English Number System

English numbers use a positional system with base-10 grouping:

Number Word Components:

Ones (1-19):
  0 = zero          10 = ten
  1 = one           11 = eleven
  2 = two           12 = twelve
  3 = three         13 = thirteen
  4 = four          14 = fourteen
  5 = five          15 = fifteen
  6 = six           16 = sixteen
  7 = seven         17 = seventeen
  8 = eight         18 = eighteen
  9 = nine          19 = nineteen

Tens (20-90):
  20 = twenty       60 = sixty
  30 = thirty       70 = seventy
  40 = forty        80 = eighty
  50 = fifty        90 = ninety

Scale Words (Periods):
  1,000     = thousand      (10^3)
  1,000,000 = million       (10^6)
  1,000,000,000 = billion   (10^9)
  1,000,000,000,000 = trillion (10^12)

Conversion Rules

Rule Description Example
Basic Numbers Numbers 0-19 have unique names 7 = seven, 15 = fifteen
Compound Numbers Hyphenate tens and ones (21-99) 42 = forty-two, 99 = ninety-nine
Hundreds Add "hundred" after ones digit 345 = three hundred forty-five
Thousands Group by 3 digits, add "thousand" 12,345 = twelve thousand three hundred forty-five
Millions Add "million" after thousands group 1,234,567 = one million two hundred thirty-four thousand five hundred sixty-seven
Billions Add "billion" after millions group 2,000,000,000 = two billion
Zero Handling Skip zero digits within groups 101 = one hundred one

Conversion Examples

Single Digit Numbers:
  0 → zero
  1 → one
  5 → five
  9 → nine

Teen Numbers (10-19):
  10 → ten
  11 → eleven
  15 → fifteen
  19 → nineteen

Tens (20-99):
  20 → twenty
  21 → twenty-one
  45 → forty-five
  99 → ninety-nine

Hundreds (100-999):
  100 → one hundred
  101 → one hundred one
  250 → two hundred fifty
  999 → nine hundred ninety-nine

Thousands (1,000-999,999):
  1,000 → one thousand
  1,234 → one thousand two hundred thirty-four
  12,345 → twelve thousand three hundred forty-five
  100,000 → one hundred thousand
  999,999 → nine hundred ninety-nine thousand nine hundred ninety-nine

Millions (1,000,000-999,999,999):
  1,000,000 → one million
  1,234,567 → one million two hundred thirty-four thousand five hundred sixty-seven
  50,000,000 → fifty million
  999,999,999 → nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine

Billions (1,000,000,000+):
  1,000,000,000 → one billion
  2,500,000,000 → two billion five hundred million
  999,999,999,999 → nine hundred ninety-nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine

Regional Differences

Feature American English British English
After Hundreds No "and" (one hundred twenty) Uses "and" (one hundred and twenty)
Billion Definition 10^9 (1,000 million) Modern: 10^9, Traditional: 10^12
Hyphen Usage 21-99 (twenty-one) 21-99 (twenty-one)
Number Grouping Commas every 3 digits Spaces or commas

Common Use Cases

Use Case Description Example
Check Writing Write dollar amounts in words $1,234.56 = One thousand two hundred thirty-four and 56/100
Legal Documents Express numbers formally in contracts Loan amount: Five hundred thousand dollars
Formal Invitations Write dates and times in words Two thousand twenty-six
Accessibility Screen reader text output Convert numeric displays to speech
Education Teaching number names to students Learning place value and word forms
Data Validation Verify numeric input format Confirm written amounts match digits

Code Examples by Language

JavaScript:
  const ones = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"];
  const tens = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"];

  function numberToWords(n) {
    if (n < 20) return ones[n];
    if (n < 100) return tens[Math.floor(n / 10)] + (n % 10 ? "-" + ones[n % 10] : "");
    if (n < 1000) return ones[Math.floor(n / 100)] + " hundred" + (n % 100 ? " " + numberToWords(n % 100) : "");
    if (n < 1000000) return numberToWords(Math.floor(n / 1000)) + " thousand" + (n % 1000 ? " " + numberToWords(n % 1000) : "");
    if (n < 1000000000) return numberToWords(Math.floor(n / 1000000)) + " million" + (n % 1000000 ? " " + numberToWords(n % 1000000) : "");
    return numberToWords(Math.floor(n / 1000000000)) + " billion" + (n % 1000000000 ? " " + numberToWords(n % 1000000000) : "");
  }

Python:
  ones = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
  tens = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]

  def number_to_words(n):
      if n < 20:
          return ones[n]
      if n < 100:
          return tens[n // 10] + ("" if n % 10 == 0 else "-" + ones[n % 10])
      if n < 1000:
          return ones[n // 100] + " hundred" + ("" if n % 100 == 0 else " " + number_to_words(n % 100))
      if n < 1000000:
          return number_to_words(n // 1000) + " thousand" + ("" if n % 1000 == 0 else " " + number_to_words(n % 1000))
      if n < 1000000000:
          return number_to_words(n // 1000000) + " million" + ("" if n % 1000000 == 0 else " " + number_to_words(n % 1000000))
      return number_to_words(n // 1000000000) + " billion" + ("" if n % 1000000000 == 0 else " " + number_to_words(n % 1000000000))

Java:
  public class NumberToWords {
      private static final String[] ONES = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
      private static final String[] TENS = {"", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};

      public static String toWords(int n) {
          if (n < 20) return ONES[n];
          if (n < 100) return TENS[n / 10] + (n % 10 > 0 ? "-" + ONES[n % 10] : "");
          if (n < 1000) return ONES[n / 100] + " hundred" + (n % 100 > 0 ? " " + toWords(n % 100) : "");
          if (n < 1000000) return toWords(n / 1000) + " thousand" + (n % 1000 > 0 ? " " + toWords(n % 1000) : "");
          if (n < 1000000000) return toWords(n / 1000000) + " million" + (n % 1000000 > 0 ? " " + toWords(n % 1000000) : "");
          return toWords(n / 1000000000) + " billion" + (n % 1000000000 > 0 ? " " + toWords(n % 1000000000) : "");
      }
  }

PHP:
  function numberToWords($n) {
      $ones = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"];
      $tens = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"];

      if ($n < 20) return $ones[$n];
      if ($n < 100) return $tens[intval($n / 10)] . ($n % 10 ? "-" . $ones[$n % 10] : "");
      if ($n < 1000) return $ones[intval($n / 100)] . " hundred" . ($n % 100 ? " " . numberToWords($n % 100) : "");
      if ($n < 1000000) return numberToWords(intval($n / 1000)) . " thousand" . ($n % 1000 ? " " . numberToWords($n % 1000) : "");
      if ($n < 1000000000) return numberToWords(intval($n / 1000000)) . " million" . ($n % 1000000 ? " " . numberToWords($n % 1000000) : "");
      return numberToWords(intval($n / 1000000000)) . " billion" . ($n % 1000000000 ? " " . numberToWords($n % 1000000000) : "");
  }

C#:
  public static string ToWords(long n)
  {
      string[] ones = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen" };
      string[] tens = { "", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" };

      if (n < 20) return ones[n];
      if (n < 100) return tens[n / 10] + (n % 10 > 0 ? "-" + ones[n % 10] : "");
      if (n < 1000) return ones[n / 100] + " hundred" + (n % 100 > 0 ? " " + ToWords(n % 100) : "");
      if (n < 1000000) return ToWords(n / 1000) + " thousand" + (n % 1000 > 0 ? " " + ToWords(n % 1000) : "");
      if (n < 1000000000) return ToWords(n / 1000000) + " million" + (n % 1000000 > 0 ? " " + ToWords(n % 1000000) : "");
      return ToWords(n / 1000000000) + " billion" + (n % 1000000000 > 0 ? " " + ToWords(n % 1000000000) : "");
  }

Special Cases

Numbers with Zeros:
  100 → one hundred (not "one hundred zero zero")
  1000 → one thousand (not "one thousand zero")
  1001 → one thousand one (skip internal zeros)
  1010 → one thousand ten
  1100 → one thousand one hundred
  10000 → ten thousand
  100000 → one hundred thousand
  1000000 → one million

Compound Numbers (Hyphenation):
  21 → twenty-one
  35 → thirty-five
  48 → forty-eight (note: "forty" not "fourty")
  57 → fifty-seven
  63 → sixty-three
  79 → seventy-nine
  86 → eighty-six
  92 → ninety-two
  99 → ninety-nine

Spelling Notes:
  40 → forty (NOT fourty - common mistake)
  14 → fourteen (keeps "four")
  15 → fifteen (NOT fiveteen)
  18 → eighteen (only one 't')
  80 → eighty (only one 't')

Best Practices

Limitations

Frequently Asked Questions

How does number to word conversion work?
The algorithm breaks numbers into groups of three digits (periods) and converts each group using ones, tens, and hundreds words. Groups are processed recursively from largest to smallest, with scale words (thousand, million, billion) appended. Compound numbers 21-99 use hyphens between tens and ones.
When should hyphens be used in number words?
Hyphens connect tens and ones in compound numbers from 21 to 99 (e.g., twenty-one, ninety-nine). Hyphens are not used between hundreds and the rest (e.g., one hundred twenty-three). Numbers 1-20 have unique names without hyphens.
What is the difference between short scale and long scale?
Short scale (US, modern UK) defines billion as 10^9 (1,000 million). Long scale (traditional European) defines billion as 10^12 (1 million million). This tool uses short scale naming, which is standard in most English-speaking countries.
How are large numbers grouped?
Numbers are grouped into periods of three digits, separated by commas. Each period has a name: ones (1-999), thousands (1,000-999,999), millions (1,000,000-999,999,999), billions (1,000,000,000+). The pattern continues with trillions, quadrillions, etc.
Should 'and' be used in number words?
British English traditionally uses 'and' after hundreds (e.g., one hundred and twenty-three). American English typically omits 'and' (e.g., one hundred twenty-three). This tool follows American convention without 'and' for consistency.
How is zero handled?
Zero is expressed as 'zero' when it appears alone. In larger numbers, zero digits within a period are skipped (e.g., 101 = one hundred one, 1000 = one thousand). Leading zeros are ignored.