By Kurashina Design · MIT License
Japanese phone numbers, checked against the official tables
Validate, format, and find Japanese phone numbers using only the numbering plan and the tables of the Ministry of Internal Affairs and Communications. Node.js, Python, and Java return the same results, offline.
Paste anything
Try kanji digits, labels like TEL:, or a whole message with several numbers.
normalize(…)
- national
- 03-5253-8111
- digits
- 0352538111
- international
- +81352538111
- type
- fixed_line
extract(…)
03-5253-8111
- Fixed-line blocks
- 41,987
- Number types
- 5
- Languages, same results
- 3
- Data as of
- 2026-11-01
Why japan-phone
- Strict, by the MIC documents03-1234-5678 is invalid: the MIC tables of local exchange codes have no such block.
- Reads Japanese as writtenFull-width digits, kanji digits like 〇九〇, labels like TEL:, and notes like (代表) or 内線.
- Finds numbers in textextract picks every phone number out of messages, pages, and business cards, and skips digit strings that are not phone numbers.
- Never guessesnormalize rejects 090--1234-5678 and 090-ABCD-5678 instead of repairing them, so forms can ask the user.
- Traceable sourcesThe table is generated from the MIC files, and the URL, date, and SHA-256 of each file ship with every package.
- Node.js, Python, JavaOne table and one set of tests for all three. No network access and no runtime dependencies.
Examples for real forms, text, and data
Every example runs on this site, and each one comes in Node.js, Python, and Java with the same output.
Compared with libphonenumber
The same formatting for every block, with stricter validity and better reading of Japanese text.
| japan-phone | libphonenumber | |
|---|---|---|
| 03-1234-5678 | Invalid | Valid |
| 090--1234-5678 | Invalid | Valid |
| 〇九〇-一二三四-五六七八 | 090-1234-5678 | Cannot parse |
Install
npm install @kurashina-design/japan-phone
import { normalize, extract } from "@kurashina-design/japan-phone";
normalize("〇三(五二五三)八一一一").national; // "03-5253-8111"
extract("日中は090-1234-5678まで").length; // 1Made by Kurashina Design
japan-phone is designed, built, and maintained by Kurashina Design. The code is under the MIT License. The bundled data was derived from MIC sources.