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.
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.
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:
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.
Converting natural language numbers into numeric digits is a common need across many domains:
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.
The converter recognizes ordinal number words and converts them to their integer form:
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 are supported using the word “point”. For example:
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.
While the parser is robust, there are a few edge cases to be aware of:
AP style requires numbers under 10 to be spelled out, but figures above 10 are digits. This converter helps editors quickly convert between styles.
When importing legacy data, numbers are sometimes stored as text. Batch-convert thousands of entries from words to integers with a single script.
Contracts often spell out dollar amounts. Use the converter to verify that the written amount matches the numeric figure, reducing errors.
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.