Words to Numbers Converter

Convert English number words — including ordinals, decimals, and large scales — into numeric digits instantly.Supports numbers from zero up to 10³⁰ (one nonillion). Built for writers, educators, data scientists, and anyone who works with textual numbers.

Supports “and”, hyphens, commas, ordinals (first, second…), decimals (point), and large scales (thousand, million, billion, trillion, quadrillion … nonillion).
Try:
one hundred twenty-three
forty-two million eight hundred thousand
three point one four one five nine
twenty-first
nine hundred ninety-nine sextillion
one thousand two hundred and thirty-four
Privacy first: All parsing is done client-side. No text or numbers are sent to any server.
Precision Note: This converter uses JavaScript's standard Number type (double-precision floating point). While we support scale words up to nonillion (10³⁰), exact integer precision is only guaranteed up to 9,007,199,254,740,991 (2⁵³ – 1). For numbers exceeding this limit, the output may be displayed in scientific notation or lose trailing digits. For cryptographic or financial use, please verify with a dedicated arbitrary-precision library.

How the Words-to-Numbers Parser Works

The Words to Numbers Converter is a deterministic finite-state parser that interprets English number words according to the short scale numbering system (used in the United States, Canada, and most English-speaking countries). It handles:

  • Cardinal numbers: one, two, three … nine hundred ninety-nine.
  • Ordinal numbers: first, second, third … twenty-first, one hundredth.
  • Decimal fractions: “point” followed by digit words (e.g., “three point one four” → 3.14).
  • Large scales: thousand, million, billion, trillion, quadrillion, quintillion, sextillion, septillion, octillion, nonillion.
  • Hyphenated forms: twenty-one, thirty-two, ninety-nine.
  • The word “and”: optionally used as a separator (e.g., “one thousand two hundred and thirty-four”).

Parsing pipeline: normalize → tokenize → classify → scale → combine → output.

The algorithm uses a recursive descent approach: each scale group (e.g., “two hundred thirty-five”) is evaluated independently, then multiplied by its scale word (thousand, million, etc.) and summed.

Why Convert Words to Numbers?

Converting natural language numbers into numeric digits is a common need across many domains:

  • Content creation & editing: Journalists, editors, and writers often receive text with numbers spelled out. Converting to digits saves space, improves readability, and ensures consistency in data-heavy articles.
  • Data science & ETL: When scraping or cleaning datasets, numbers often appear as words (e.g., “five thousand”). A robust parser is essential for transforming text into structured numeric data.
  • Localization & internationalization: Software that displays numbers in multiple languages benefits from a reversible conversion between words and digits.
  • Educational tools: Teachers use number-word converters to help students learn place value, number names, and the relationship between spoken and written numbers.
  • Legal & financial documents: In contracts and checks, numbers are often written both as words and digits to prevent fraud. A converter can verify consistency.

Supported Number Scales

This converter follows the short scale (also called the American scale), where each new scale word is 1,000 times the previous one:

Scale word Multiplier Numeric value
thousand 10³ 1,000
million 10⁶ 1,000,000
billion 10⁹ 1,000,000,000
trillion 10¹² 1,000,000,000,000
quadrillion 10¹⁵ 1,000,000,000,000,000
quintillion 10¹⁸ 1,000,000,000,000,000,000
sextillion 10²¹ 1,000,000,000,000,000,000,000
septillion 10²⁴ 1,000,000,000,000,000,000,000,000
octillion 10²⁷ 1,000,000,000,000,000,000,000,000,000
nonillion 10³⁰ 1,000,000,000,000,000,000,000,000,000,000

The lexical parser recognizes scale words up to nonillion (10³⁰). However, due to JavaScript's numeric precision limits, the exact integer output is only reliable up to 9 quadrillion. Values beyond this threshold are computed as floating-point numbers and may appear in exponential notation. This limitation is clearly stated in our Precision Notice above.

Ordinal Numbers & Special Cases

The converter recognizes ordinal number words and converts them to their integer form:

  • First → 1, second → 2, … tenth → 10, twenty-first → 21.
  • Ordinals are normalized by stripping the “st”, “nd”, “rd”, or “th” suffix and then parsing the stem as a cardinal.
  • Irregular ordinals (first, second, third, fifth, eighth, ninth, twelfth) are handled explicitly via a mapping table.
  • Compound ordinals like “twenty-third” are parsed as “twenty” + “third” → 23.
Example: “one hundred twenty-third”

The parser identifies “third” as an ordinal marker, extracts the stem “one hundred twenty”, parses it as 120, then applies the ordinal suffix to produce 123 (since “third” = 3). This handles most English ordinal constructions accurately.

Decimal Numbers & Fractions

Decimal numbers are supported using the word “point”. For example:

  • “three point one four” → 3.14
  • “zero point zero zero one” → 0.001
  • “one hundred twenty-three point four five six” → 123.456

Digits after the decimal point are read individually: “one four” becomes 14, “zero five” becomes 05. The parser supports up to 15 decimal places, which is the limit of JavaScript's double-precision floating-point representation before rounding errors occur. For exact decimal arithmetic, the result is returned as a string.

Common Pitfalls & Grammar Rules

While the parser is robust, there are a few edge cases to be aware of:

  • “And” placement: In American English, “and” is often used before the last two digits (e.g., “one thousand two hundred and thirty-four”). The parser accepts this but does not require it. In British English, “and” is more common; both styles work.
  • Hyphenation: Numbers between 21 and 99 that are not multiples of ten are hyphenated (e.g., “twenty-one”, “ninety-nine”). The parser handles both hyphenated and non-hyphenated forms.
  • Scale repetition: The parser does not allow repeated scale words (e.g., “thousand thousand”) and will produce an error. This is by design: it prevents ambiguity and forces correct numeric grammar.
  • Zero vs. naught: The parser accepts “zero”, “oh”, and “naught” as valid terms for 0.
  • Leading "and": A leading “and” (e.g., “and twenty-three”) is ignored.

Real-World Applications

Journalism

AP style requires numbers under 10 to be spelled out, but figures above 10 are digits. This converter helps editors quickly convert between styles.

Data Cleaning

When importing legacy data, numbers are sometimes stored as text. Batch-convert thousands of entries from words to integers with a single script.

Legal Tech

Contracts often spell out dollar amounts. Use the converter to verify that the written amount matches the numeric figure, reducing errors.

Frequently Asked Questions

The converter supports numbers up to 10³⁰ (one nonillion). This is far beyond what most practical applications require. For example, the number of atoms in the observable universe is estimated to be around 10⁸⁰, which is beyond this range, but for finance, engineering, and everyday use, 10³⁰ is more than sufficient.

Yes. Simply prefix the number words with “negative” or “minus” (e.g., “negative forty-two” → -42). The parser recognizes these qualifiers and applies the appropriate sign.

The word “and” is treated as a separator. It does not affect the numeric value. For example, “one hundred and five” and “one hundred five” both convert to 105. The parser also handles “and” in British-style numbers like “one thousand and twenty-three” → 1023.

Currently, only English number words are supported. However, the parser is designed to be extensible. We are actively working on adding Spanish, French, and German number parsers. If you need a specific language, please let us know via our feedback form.

The parser will display a clear error message indicating the problematic token or structure. For example, “one hundred thousand thousand” will trigger a “repeated scale word” error. The error messages are designed to help you correct the input.

Yes! We also offer a Numbers to Words Converter that does the opposite: convert any integer into English words. The two tools are perfect companions for localization, education, and document formatting.

JavaScript's Number type has a maximum safe integer of 2⁵³ – 1 (about 9 quadrillion). Numbers larger than this cannot be stored with exact integer precision. The parser correctly understands words like "sextillion" or "nonillion", but the output is limited by the underlying JavaScript engine's math capabilities. We prioritize transparency over false precision. If you need exact arithmetic for astronomically large numbers, we recommend using a dedicated BigInt library or server-side language with native big integer support.

Built on linguistic and mathematical principles – This converter is based on the grammar of English number names as described in standard reference works (e.g., the Chicago Manual of Style, AP Stylebook, and the Oxford English Dictionary). The parsing algorithm was inspired by finite-state transducers used in natural language processing and has been validated against thousands of test cases covering edge cases, scale words, and ordinal forms. Last reviewed and updated by the GetZenQuery tech team in June 2026.