Number ↔ Words Converter

JJ Ben-Joseph headshot JJ Ben-Joseph

How to Use the Number ↔ Words Converter

This tool converts between numeric digits and written English number words in both directions. You can spell out an integer such as 572 as “five hundred seventy-two,” or parse a phrase like “seven thousand five hundred” back into 7500. Everything runs in your browser, so no data is sent to a server.

The converter is designed for clarity and consistency, making it useful for check writing, invoices, educational practice, and accessibility scenarios such as screen readers.

How Number to Words Conversion Works

At the core of the tool is the idea of place value: every digit in a number represents a multiple of a power of ten. Any non-negative integer can be written as a sum of digits times powers of ten. In MathML, positional notation can be expressed as:

n = i=0 k d i 10 i

Here, each di is a digit from 0 to 9. The script takes those digits in groups of three (hundreds, tens, ones) and associates each group with an English “scale word” such as thousand or million.

Core Word Mappings

The converter uses a small dictionary of fixed words that cover the basic numbers. Larger values are constructed from these building blocks.

Core English number word mappings from 0 to 90
Number Word
0zero
1one
2two
3three
4four
5five
6six
7seven
8eight
9nine
10ten
11eleven
12twelve
13thirteen
14fourteen
15fifteen
16sixteen
17seventeen
18eighteen
19nineteen
20twenty
30thirty
40forty
50fifty
60sixty
70seventy
80eighty
90ninety

Chunking into Hundreds, Thousands, and Millions

To spell a number, the script splits it into three-digit chunks from right to left:

Each chunk is processed with a helper function that:

  1. Emits a “hundreds” part if the first digit is non-zero (for example, 5 in 572 becomes “five hundred”).
  2. Looks at the last two digits; if they are 0–19, it uses a direct mapping such as “twelve” or “nineteen.”
  3. For 20–99, it combines a tens word like “twenty” or “sixty” with a ones word, using a hyphen when required, for example “twenty-three.”

The final result is assembled by attaching scale words to each non-zero chunk and joining them with spaces.

How Words to Number Parsing Works

Parsing in the reverse direction starts with a phrase of English number words and produces a single integer. The parser:

Small number words like “one,” “eleven,” or “ninety” add their value into the accumulator. Magnitude words such as “hundred,” “thousand,” and “million” scale or move that accumulator:

Consider “two thousand and six”:

  1. two sets the accumulator to 2.
  2. thousand multiplies 2 by 1000 to get 2000 and adds it to the total.
  3. and is treated as optional and ignored.
  4. six sets the accumulator to 6; at the end, this is added to the total for a result of 2006.

The same approach allows the parser to handle “seven hundred eighty-nine thousand three hundred one,” “one hundred twenty-three,” and similar standard cardinal phrases.

Worked Examples

Number → Words

Words → Number

Both “one hundred one” and “one hundred and one” are interpreted as the same value. The parser is tolerant of optional “and” in typical British-style wording while producing a consistent spelling style in its own output.

Interpreting the Results

When you use the converter, keep the following points in mind as you interpret the output:

These conventions are designed to keep the results predictable while still understanding the most common variants people type.

Comparison of Supported and Unsupported Inputs

Category Examples Supported?
Non-negative integers within range 0, 42, 1005, 999999999 Yes
Standard English number words (cardinals) “zero”, “forty-two”, “seven thousand five hundred” Yes
Optional “and” in wording “one hundred and one”, “two thousand and six” Yes, treated the same as without “and”
Numbers above 999,999,999 1000000000, “one billion one” No, out of supported range
Negative numbers -5, “minus three” No, not handled by this version
Decimals and fractions 3.14, “one and a half” No, integers only
Currencies and mixed formats “one dollar and ten cents”, “€5.20” No, treat amounts as plain integers instead
Ordinals “first”, “twenty-second”, “101st” No, only cardinal numbers
Informal / ambiguous phrases “a couple hundred”, “about five thousand” Usually no, wording must be explicit

Supported Range, Language, and Limitations

To avoid confusion, the tool follows a clearly defined scope:

The following constraints are important:

Being aware of these assumptions helps you understand when you can trust the results and when additional care is needed.

Practical Uses and Accessibility

This converter is useful in several everyday and professional contexts:

Because all calculations happen locally in your browser, the tool works offline after it loads and does not transmit your inputs to a server. This makes it suitable for sensitive or private numbers where you prefer not to use a networked service.

Summary

The Number ↔ Words Converter gives you a reliable way to move between digits and English number words within a well-defined range. By following standard cardinal wording, clear hyphenation rules, and a short-scale interpretation of large numbers, it balances accuracy with ease of use. As long as you stay within the documented limits—non-negative integers up to 999,999,999 and standard English phrasing—you can rely on the outputs for documents, learning, and accessibility tasks.

Enter a number or phrase to convert between digits and words.

Embed this calculator

Copy and paste the HTML below to add the Number ↔ Words Converter - Spell and Parse Numbers to your website.