The Japanese number-to-words tool converts ordinary integers into their kanji spelling, the form used on formal documents, cheques, contracts and signage. Unlike English, which groups digits into thousands, Japanese groups them into units of ten thousand, so the kanji rendering of a large number looks quite different from inserting commas every three digits.
How it works
The number is split into four-digit groups counting from the right. Each group of up to four digits is spelled using the digit kanji 一 through 九 and the place markers 十 (10), 百 (100) and 千 (1,000). A leading one before a place marker is dropped, so 10 becomes 十 rather than 一十. The groups are then labelled with the big-unit kanji that climb every four digits: 万 (10^4), 億 (10^8), 兆 (10^12) and 京 (10^16). Empty groups and internal zeros are skipped, and the value zero is rendered as 零.
Example and notes
Take 12345. Splitting into four-digit groups gives 1 and 2345. The lower group spells 二千三百四十五, and the upper group of one becomes 一万. Joined, the result is 一万二千三百四十五. A value with a gap, such as 10005, becomes 一万五 because the empty thousands and hundreds positions are simply omitted. Negative numbers are prefixed with マイナス. Everything is computed locally in your browser.