Convert Words to Integers

Convert English number words to integers (and back). Supports negatives, billions, error reporting per line. Free, client-side, instant.

Parse English number words (e.g. "forty-two", "one hundred twenty-three") to integers - and reverse. Supports negative, hyphenated, "and"-tolerant phrasing, ones through trillions. Unrecognized words are reported as errors, so a typo like "five potatoes" can never slip through as 5.

Type to begin.

How to Use Convert Words to Integers

  1. Enter number words, one per line. Supported: zero through nine, ten through nineteen, twenty through ninety, hundred, thousand, million, billion, trillion.
  2. Prefix with negative or minus for negative values: negative twenty-three.
  3. Hyphens and "and" are tolerated: twenty-three, one hundred and twenty.
  4. Unrecognized words cause that line to fail with position-specific error (ERROR: Unrecognized word at position 2: "potatoes") - instead of silently producing wrong output.
  5. Swap to convert integers back to words.

Frequently Asked Questions

What number words are recognized?

Ones (zero-nine), teens (ten-nineteen), tens (twenty-ninety), and scale words (hundred, thousand, million, billion, trillion). Plus “negative” or “minus” prefix and “and” connector. Anything else (including “a”, “uno”, “dos”, “twenty-twenty”, “infinity”) triggers an explicit error.

Why does the tool throw an error instead of skipping unknown words?

Silent skipping hides bugs: "five potatoes" would look like 5 and "twenty foo" like 20, so typos produce plausible but wrong numbers. The parser reports the exact word and position it could not read, letting you fix the input instead of trusting a bad result.

Can it handle “a hundred” or “a thousand”?

Not currently. “a” isn’t in the dictionary. Use one hundred or one thousand instead.

What about ordinal words like “first” or “twenty-third”?

Not supported. Ordinals require a different parser. For now, use the cardinal forms: one, twenty-three.

What’s the maximum integer?

One trillion = 1,000,000,000,000 = 10^12. JavaScript’s Number can hold up to 2^53 – 1 (≈ 9 × 10^15), but the English vocabulary in this tool stops at trillion. For larger values, use scientific notation outside this tool.

What about decimals?

Not supported in either direction. "three point five" errors because “point” isn’t in the dictionary. For decimals, use a different tool that handles “point” / “decimal” / fractional words.

Does the reverse direction work for negative numbers?

Yes. -100"negative one hundred". -1234"negative one thousand two hundred thirty-four".

What if I want British vs American “billion”?

This tool uses the modern (short-scale) definition: billion = 10^9. The British long-scale billion (= 10^12) is no longer commonly used in UK English either. If you specifically need long-scale, multiply manually.

Is text uploaded?

No. Everything runs in your browser with JavaScript – nothing is sent to a server, logged, or stored, and the tool keeps working offline once the page has loaded.

How are errors reported in batch?

Each line is parsed independently. Lines that fail show ERROR: ... at their position in the output. Stats show success/failure counts.