Validity rules
Reject numbers that cannot exist
isValid
Numbers missing from the numbering plan or the MIC tables are invalid.
Try it
- valid
03-5253-8111 - invalid
03-1234-5678 - valid
092-513-5612 - invalid
092-123-4567 - invalid
0123-00-0000
How it works
japan-phone validates against the numbering plan and the MIC tables of local exchange codes.
- A fixed-line block must be listed in the MIC tables, as in use or unused.
- The blocks of
03-1234-5678,092-123-4567, and0123-00-0000are not listed. The tables have no block where the digit after the area code is0or1.
libphonenumber accepts all three as valid fixed-line numbers. In our December 2026 comparison it accepted 27,113 blocks that are not in the MIC tables, in 11,749 of which the digit after the area code is 0 or 1.
In each language
import { isValid } from "@kurashina-design/japan-phone";
// Every fixed-line block must be in the MIC tables of local exchange codes.
for (const input of ["03-5253-8111", "03-1234-5678", "092-513-5612", "092-123-4567", "0123-00-0000"]) {
console.log(input, isValid(input) ? "valid" : "invalid");
}
from japan_phone import is_valid
# Every fixed-line block must be in the MIC tables of local exchange codes.
for value in ["03-5253-8111", "03-1234-5678", "092-513-5612", "092-123-4567", "0123-00-0000"]:
print(value, "valid" if is_valid(value) else "invalid")
import jp.kurashina.japanphone.JapanPhone;
// Every fixed-line block must be in the MIC tables of local exchange codes.
for (String input : new String[] {"03-5253-8111", "03-1234-5678", "092-513-5612", "092-123-4567", "0123-00-0000"}) {
System.out.println(input + " " + (JapanPhone.isValid(input) ? "valid" : "invalid"));
}
Output:
03-5253-8111 valid
03-1234-5678 invalid
092-513-5612 valid
092-123-4567 invalid
0123-00-0000 invalid