User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

About

Raw data values - timestamps, byte counts, large integers - are unambiguous to machines but hostile to human cognition. A value like 1048576 requires mental parsing; the phrase "one million forty-eight thousand five hundred seventy-six" does not. Misreading a single digit in a financial figure or a date field can cascade into contractual errors, incorrect invoices, or compliance violations. This tool implements deterministic verbalization algorithms for 10 distinct data types: cardinal and ordinal numbers (up to 1015), ISO dates, relative timestamps, millisecond durations, Oxford-comma lists, binary and SI file sizes, booleans, percentages, and English pluralization with an irregular-word dictionary.

Each function returns a plain English string with no markup. The number-to-words engine uses recursive scale-group decomposition through trillions. The pluralizer covers 80+ irregular English nouns. Relative time calculations reference Date.now() and bucket deltas into the most natural human unit. This tool approximates natural speech patterns. It does not handle locale-specific grammar or non-English languages. Pro tip: when verbalizing currency, convert to the minor unit (cents) first to avoid floating-point rounding artifacts.

number to words verbalize human readable data converter text formatter number converter date to words file size to words ordinal pluralize

Formulas

The number-to-words algorithm decomposes an integer n into scale groups using integer division and modulo. For each scale s in the ordered set {trillion, billion, million, thousand}:

chunk = floor(n Γ· s)
n = n βˆ’ chunk Γ— s

Each chunk (0 - 999) is recursively verbalized into hundreds, tens, and ones using lookup tables. Decimals are handled by splitting at the decimal point and verbalizing each digit of the fractional part individually, joined by the word "point".

Relative time computes the signed delta Ξ”t:

Ξ”t = tnow βˆ’ tinput

The delta is bucketed through thresholds: 60 s β†’ minutes, 3600 s β†’ hours, 86400 s β†’ days, 2592000 s β†’ months, 31536000 s β†’ years. The sign of Ξ”t determines "ago" vs. "in".

File size conversion divides bytes by the appropriate base:

value = bytesbasee

Where base = 1024 for binary (KiB, MiB, GiB) or 1000 for SI (KB, MB, GB), and e is the largest exponent such that value β‰₯ 1.

The ordinal suffix is determined by the last two digits d of n: if d ∈ {11, 12, 13} β†’ "th"; else last digit 1 β†’ "st", 2 β†’ "nd", 3 β†’ "rd", otherwise "th".

Where n = input number, s = scale value, chunk = group value (0 - 999), tnow = current timestamp, tinput = input timestamp, Ξ”t = time difference in seconds, bytes = input byte count, base = 1024 or 1000, e = scale exponent, d = last two digits for ordinal suffix.

Reference Data

ModeInput ExampleOutput ExampleRange / Limits
Number to Words1450one thousand four hundred fiftyβˆ’999 trillion to 999 trillion
Ordinal4242ndAny non-negative integer
Date to Words2024-03-15March 15th, 2024Any valid ISO 8601 date
Relative Time2024-01-01T00:00:00Z5 months agoAny valid date/timestamp
Duration90061000 ms1 day, 1 hour, 1 minute, 1 second0 to 1015 ms
Listapples, oranges, bananasapples, oranges, and bananasAny comma-separated items
File Size1073741824 bytes1.00 GiB0 to 1015 bytes
BooleanTRUEyesTRUE / FALSE / 1 / 0
Percentage42.5forty-two point five percentAny numeric value
Pluralizechild, 33 childrenEnglish nouns, count β‰₯ 0
Number (negative)βˆ’250negative two hundred fiftyHandles sign prefix
Number (decimal)3.14three point one fourArbitrary decimal digits
Duration (small)450 ms450 millisecondsSub-second precision
File Size (SI)1000000 bytes1.00 MBSI (base-10) mode
Ordinal (edge)111111thHandles 11th/12th/13th correctly

Frequently Asked Questions

English teens are irregular: "eleven" through "nineteen" do not follow the tens-plus-ones pattern of numbers like "twenty-one." The algorithm uses a dedicated lookup table for values 11-19. When the remainder after extracting hundreds is between 11 and 19, the engine indexes directly into this table instead of decomposing into a tens word plus a ones word. This prevents outputs like "ten-one" for 11.
The converter caps at Β±999,999,999,999,999 (just under 10¹⁡). Values beyond this range return a clear error message rather than producing incorrect output. JavaScript's Number.MAX_SAFE_INTEGER is approximately 9 Γ— 10¹⁡, so precision loss in the input itself is the primary risk. For financial or scientific values exceeding this range, convert the number to a string representation and process externally.
The default is binary (KiB, MiB, GiB) using base 1024, which matches how operating systems report storage. A toggle switches to SI (KB, MB, GB) using base 1000, which matches how drive manufacturers label capacity. The discrepancy means a "500 GB" drive shows as approximately 465 GiB. Choosing the wrong base for a capacity report can create a perceived 7-10% error in reported values.
The engine maintains a dictionary of 80+ irregular plural forms (child β†’ children, mouse β†’ mice, datum β†’ data, person β†’ people, etc.). Before applying suffix rules (-s, -es, -ies), it checks the irregular dictionary for an exact match. Uncountable nouns (sheep, fish, species) return the same form regardless of count. Words not in the dictionary fall back to standard English suffix rules: consonant+y β†’ -ies, sibilants β†’ -es, otherwise -s.
The converter accepts ISO 8601 strings (2024-03-15, 2024-03-15T14:30:00Z) and Unix timestamps in milliseconds. Dates without a timezone suffix are parsed in the browser's local timezone per the ECMAScript spec. To avoid ambiguity, append "Z" for UTC or include an explicit offset like "+05:30". The relative calculation uses Date.now() as the reference point, so results update if you re-trigger conversion.
The converter truncates input to whole milliseconds. Sub-millisecond values (microseconds, nanoseconds) are not standard in JavaScript's Date API and are outside the scope of human-readable duration text. For values under 1000 ms, the output reads as milliseconds directly (e.g., '450 milliseconds'). For zero, it returns "zero milliseconds". Negative durations are treated as their absolute value with a "negative" prefix.