[{"data":1,"prerenderedAt":712,"buildId":713},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Fplan-check":30,"example-surround-\u002Fexamples\u002Fplan-check":620,"examples-en":630},[4],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Docs","\u002Fdocs","docs",[9,13,17,21,25],{"title":10,"path":11,"stem":12},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",{"title":14,"path":15,"stem":16},"In the browser and with frameworks","\u002Fdocs\u002Fin-the-browser","docs\u002F2.in-the-browser",{"title":18,"path":19,"stem":20},"Input rules","\u002Fdocs\u002Finput-rules","docs\u002F3.input-rules",{"title":22,"path":23,"stem":24},"Compared with libphonenumber","\u002Fdocs\u002Flibphonenumber","docs\u002F4.libphonenumber",{"title":26,"path":27,"stem":28},"Data and sources","\u002Fdocs\u002Fdata-and-sources","docs\u002F5.data-and-sources",false,{"id":31,"title":32,"body":33,"category":610,"demo":611,"description":612,"extension":613,"meta":614,"navigation":142,"order":104,"path":615,"seo":616,"stem":617,"uses":618,"__hash__":619},"examples_en\u002Fexamples\u002Fplan-check.md","Reject numbers that cannot exist",{"type":34,"value":35,"toc":606},"minimark",[36,41,45,76,83,87,591,594,602],[37,38,40],"h2",{"id":39},"how-it-works","How it works",[42,43,44],"p",{},"japan-phone validates against the numbering plan and the MIC tables of local exchange codes.",[46,47,48,52],"ul",{},[49,50,51],"li",{},"A fixed-line block must be listed in the MIC tables, as in use or unused.",[49,53,54,55,59,60,63,64,67,68,71,72,75],{},"The blocks of ",[56,57,58],"code",{},"03-1234-5678",", ",[56,61,62],{},"092-123-4567",", and ",[56,65,66],{},"0123-00-0000"," are not listed. The tables have no block where the digit after the area code is ",[56,69,70],{},"0"," or ",[56,73,74],{},"1",".",[42,77,78,79,71,81,75],{},"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 ",[56,80,70],{},[56,82,74],{},[37,84,86],{"id":85},"in-each-language","In each language",[88,89,90,283,410],"code-group",{},[91,92,98],"pre",{"className":93,"code":94,"filename":95,"language":96,"meta":97,"style":97},"language-js shiki shiki-themes material-theme-lighter github-light github-dark","import { isValid } from \"@kurashina-design\u002Fjapan-phone\";\n\n\u002F\u002F Every fixed-line block must be in the MIC tables of local exchange codes.\nfor (const input of [\"03-5253-8111\", \"03-1234-5678\", \"092-513-5612\", \"092-123-4567\", \"0123-00-0000\"]) {\n  console.log(input, isValid(input) ? \"valid\" : \"invalid\");\n}\n","Node.js","js","",[56,99,100,137,144,151,222,277],{"__ignoreMap":97},[101,102,105,109,113,117,120,123,127,131,134],"span",{"class":103,"line":104},"line",1,[101,106,108],{"class":107},"sVHd0","import",[101,110,112],{"class":111},"sP7_E"," {",[101,114,116],{"class":115},"su5hD"," isValid",[101,118,119],{"class":111}," }",[101,121,122],{"class":107}," from",[101,124,126],{"class":125},"sjJ54"," \"",[101,128,130],{"class":129},"s_sjI","@kurashina-design\u002Fjapan-phone",[101,132,133],{"class":125},"\"",[101,135,136],{"class":111},";\n",[101,138,140],{"class":103,"line":139},2,[101,141,143],{"emptyLinePlaceholder":142},true,"\n",[101,145,147],{"class":103,"line":146},3,[101,148,150],{"class":149},"sutJx","\u002F\u002F Every fixed-line block must be in the MIC tables of local exchange codes.\n",[101,152,154,157,160,164,168,172,175,177,180,182,185,187,189,191,193,195,198,200,202,204,206,208,210,212,214,216,219],{"class":103,"line":153},4,[101,155,156],{"class":107},"for",[101,158,159],{"class":115}," (",[101,161,163],{"class":162},"sbsja","const",[101,165,167],{"class":166},"s_hVV"," input",[101,169,171],{"class":170},"smGrS"," of",[101,173,174],{"class":115}," [",[101,176,133],{"class":125},[101,178,179],{"class":129},"03-5253-8111",[101,181,133],{"class":125},[101,183,184],{"class":111},",",[101,186,126],{"class":125},[101,188,58],{"class":129},[101,190,133],{"class":125},[101,192,184],{"class":111},[101,194,126],{"class":125},[101,196,197],{"class":129},"092-513-5612",[101,199,133],{"class":125},[101,201,184],{"class":111},[101,203,126],{"class":125},[101,205,62],{"class":129},[101,207,133],{"class":125},[101,209,184],{"class":111},[101,211,126],{"class":125},[101,213,66],{"class":129},[101,215,133],{"class":125},[101,217,218],{"class":115},"]) ",[101,220,221],{"class":111},"{\n",[101,223,225,228,230,234,238,241,243,245,247,249,252,255,257,260,262,265,267,270,272,275],{"class":103,"line":224},5,[101,226,227],{"class":115},"  console",[101,229,75],{"class":111},[101,231,233],{"class":232},"sGLFI","log",[101,235,237],{"class":236},"skxfh","(",[101,239,240],{"class":115},"input",[101,242,184],{"class":111},[101,244,116],{"class":232},[101,246,237],{"class":236},[101,248,240],{"class":115},[101,250,251],{"class":236},") ",[101,253,254],{"class":170},"?",[101,256,126],{"class":125},[101,258,259],{"class":129},"valid",[101,261,133],{"class":125},[101,263,264],{"class":170}," :",[101,266,126],{"class":125},[101,268,269],{"class":129},"invalid",[101,271,133],{"class":125},[101,273,274],{"class":236},")",[101,276,136],{"class":111},[101,278,280],{"class":103,"line":279},6,[101,281,282],{"class":111},"}\n",[91,284,289],{"className":285,"code":286,"filename":287,"language":288,"meta":97,"style":97},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","from japan_phone import is_valid\n\n# Every fixed-line block must be in the MIC tables of local exchange codes.\nfor value in [\"03-5253-8111\", \"03-1234-5678\", \"092-513-5612\", \"092-123-4567\", \"0123-00-0000\"]:\n    print(value, \"valid\" if is_valid(value) else \"invalid\")\n","Python","python",[56,290,291,304,308,313,366],{"__ignoreMap":97},[101,292,293,296,299,301],{"class":103,"line":104},[101,294,295],{"class":107},"from",[101,297,298],{"class":115}," japan_phone ",[101,300,108],{"class":107},[101,302,303],{"class":115}," is_valid\n",[101,305,306],{"class":103,"line":139},[101,307,143],{"emptyLinePlaceholder":142},[101,309,310],{"class":103,"line":146},[101,311,312],{"class":149},"# Every fixed-line block must be in the MIC tables of local exchange codes.\n",[101,314,315,317,320,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363],{"class":103,"line":153},[101,316,156],{"class":107},[101,318,319],{"class":115}," value ",[101,321,322],{"class":107},"in",[101,324,174],{"class":111},[101,326,133],{"class":125},[101,328,179],{"class":129},[101,330,133],{"class":125},[101,332,184],{"class":111},[101,334,126],{"class":125},[101,336,58],{"class":129},[101,338,133],{"class":125},[101,340,184],{"class":111},[101,342,126],{"class":125},[101,344,197],{"class":129},[101,346,133],{"class":125},[101,348,184],{"class":111},[101,350,126],{"class":125},[101,352,62],{"class":129},[101,354,133],{"class":125},[101,356,184],{"class":111},[101,358,126],{"class":125},[101,360,66],{"class":129},[101,362,133],{"class":125},[101,364,365],{"class":111},"]:\n",[101,367,368,372,374,378,380,382,384,386,389,392,394,396,398,401,403,405,407],{"class":103,"line":224},[101,369,371],{"class":370},"sptTA","    print",[101,373,237],{"class":111},[101,375,377],{"class":376},"slqww","value",[101,379,184],{"class":111},[101,381,126],{"class":125},[101,383,259],{"class":129},[101,385,133],{"class":125},[101,387,388],{"class":107}," if",[101,390,391],{"class":376}," is_valid",[101,393,237],{"class":111},[101,395,377],{"class":376},[101,397,274],{"class":111},[101,399,400],{"class":107}," else",[101,402,126],{"class":125},[101,404,269],{"class":129},[101,406,133],{"class":125},[101,408,409],{"class":111},")\n",[91,411,416],{"className":412,"code":413,"filename":414,"language":415,"meta":97,"style":97},"language-java shiki shiki-themes material-theme-lighter github-light github-dark","import jp.kurashina.japanphone.JapanPhone;\n\n\u002F\u002F Every fixed-line block must be in the MIC tables of local exchange codes.\nfor (String input : new String[] {\"03-5253-8111\", \"03-1234-5678\", \"092-513-5612\", \"092-123-4567\", \"0123-00-0000\"}) {\n  System.out.println(input + \" \" + (JapanPhone.isValid(input) ? \"valid\" : \"invalid\"));\n}\n","Java","java",[56,417,418,444,448,452,522,587],{"__ignoreMap":97},[101,419,420,423,427,429,432,434,437,439,442],{"class":103,"line":104},[101,421,108],{"class":422},"sw1J6",[101,424,426],{"class":425},"s_bVq"," jp",[101,428,75],{"class":111},[101,430,431],{"class":425},"kurashina",[101,433,75],{"class":111},[101,435,436],{"class":425},"japanphone",[101,438,75],{"class":111},[101,440,441],{"class":425},"JapanPhone",[101,443,136],{"class":111},[101,445,446],{"class":103,"line":139},[101,447,143],{"emptyLinePlaceholder":142},[101,449,450],{"class":103,"line":146},[101,451,150],{"class":149},[101,453,454,456,458,461,464,467,470,473,476,478,480,482,484,486,488,490,492,494,496,498,500,502,504,506,508,510,512,514,516,519],{"class":103,"line":153},[101,455,156],{"class":107},[101,457,159],{"class":111},[101,459,460],{"class":425},"String",[101,462,463],{"class":115}," input ",[101,465,466],{"class":107},":",[101,468,469],{"class":107}," new",[101,471,472],{"class":162}," String",[101,474,475],{"class":111},"[]",[101,477,112],{"class":111},[101,479,133],{"class":125},[101,481,179],{"class":129},[101,483,133],{"class":125},[101,485,184],{"class":111},[101,487,126],{"class":125},[101,489,58],{"class":129},[101,491,133],{"class":125},[101,493,184],{"class":111},[101,495,126],{"class":125},[101,497,197],{"class":129},[101,499,133],{"class":125},[101,501,184],{"class":111},[101,503,126],{"class":125},[101,505,62],{"class":129},[101,507,133],{"class":125},[101,509,184],{"class":111},[101,511,126],{"class":125},[101,513,66],{"class":129},[101,515,133],{"class":125},[101,517,518],{"class":111},"})",[101,520,521],{"class":111}," {\n",[101,523,524,527,529,532,534,537,539,542,545,547,549,552,554,556,558,561,563,565,567,570,572,574,576,578,580,582,584],{"class":103,"line":224},[101,525,526],{"class":115},"  System",[101,528,75],{"class":111},[101,530,531],{"class":115},"out",[101,533,75],{"class":111},[101,535,536],{"class":232},"println",[101,538,237],{"class":111},[101,540,541],{"class":115},"input ",[101,543,544],{"class":170},"+",[101,546,126],{"class":125},[101,548,126],{"class":125},[101,550,551],{"class":170}," +",[101,553,159],{"class":111},[101,555,441],{"class":115},[101,557,75],{"class":111},[101,559,560],{"class":232},"isValid",[101,562,237],{"class":111},[101,564,240],{"class":115},[101,566,274],{"class":111},[101,568,569],{"class":107}," ?",[101,571,126],{"class":125},[101,573,259],{"class":129},[101,575,133],{"class":125},[101,577,264],{"class":107},[101,579,126],{"class":125},[101,581,269],{"class":129},[101,583,133],{"class":125},[101,585,586],{"class":111},"));\n",[101,588,589],{"class":103,"line":279},[101,590,282],{"class":111},[42,592,593],{},"Output:",[91,595,600],{"className":596,"code":598,"language":599,"meta":97},[597],"language-text","03-5253-8111 valid\n03-1234-5678 invalid\n092-513-5612 valid\n092-123-4567 invalid\n0123-00-0000 invalid\n","text",[56,601,598],{"__ignoreMap":97},[603,604,605],"style",{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":97,"searchDepth":139,"depth":139,"links":607},[608,609],{"id":39,"depth":139,"text":40},{"id":85,"depth":139,"text":86},"rules","plan-check","Numbers missing from the numbering plan or the MIC tables are invalid.","md",{},"\u002Fexamples\u002Fplan-check",{"title":32,"description":612},"examples\u002Fplan-check",[560],"u-2IPx-MzV4MIVlQWbMDHjjwzFffhyDomoWnEkyhCBY",[621,626],{"path":622,"title":623,"description":624,"category":625,"order":224},"\u002Fexamples\u002Fe164","Convert to E.164","Pass numbers to SMS gateways, CRMs, and libphonenumber in international form.","data",{"path":627,"title":628,"description":629,"category":610,"order":139},"\u002Fexamples\u002Finternational-input","Read numbers written for abroad","Accept +81 notation, including the bracketed (0), for the types that can be dialed from abroad.",[631,639,645,652,659,666,672,679,686,692,698,704,707,709],{"path":632,"title":633,"description":634,"category":635,"order":104,"uses":636,"demo":638},"\u002Fexamples\u002Fvalidate-input","Validate a phone number field","Accept full-width input, reject numbers that do not exist, and save one notation.","forms",[637],"normalize","validate-input",{"path":640,"title":641,"description":642,"category":635,"order":139,"uses":643,"demo":644},"\u002Fexamples\u002Fpaste-labels","Accept pasted labels and notes","Take the main number from lines like ",[637],"paste-labels",{"path":646,"title":647,"description":648,"category":635,"order":146,"uses":649,"demo":651},"\u002Fexamples\u002Fmobile-only","Accept mobile numbers only","Use the type to decide whether a number can receive SMS.",[637,650],"type","mobile-only",{"path":653,"title":654,"description":655,"category":635,"order":153,"uses":656,"demo":658},"\u002Fexamples\u002Ftel-link","Make tel: links","Link numbers in their international form, and keep domestic-only numbers dialable.",[637,657],"international","tel-link",{"path":660,"title":661,"description":662,"category":599,"order":104,"uses":663,"demo":665},"\u002Fexamples\u002Fextract-inquiry","Find numbers in a message","Pick every phone number out of a message, in the order it appears.",[664],"extract","extract-inquiry",{"path":667,"title":668,"description":669,"category":599,"order":139,"uses":670,"demo":671},"\u002Fexamples\u002Fbusiness-card","Read a business card in kanji digits","Find numbers written with 〇一二三, as on vertical business cards.",[664],"business-card",{"path":673,"title":674,"description":675,"category":599,"order":146,"uses":676,"demo":678},"\u002Fexamples\u002Fcompany-page","List the numbers on a company page","Find TEL and FAX numbers and drop duplicates written in other notations.",[664,677],"digits","company-page",{"path":680,"title":681,"description":682,"category":625,"order":104,"uses":683,"demo":685},"\u002Fexamples\u002Fdisplay-format","Store digits, show hyphens","Format stored digits with the groups from the numbering table.",[637,684],"national","display-format",{"path":687,"title":688,"description":689,"category":625,"order":139,"uses":690,"demo":691},"\u002Fexamples\u002Fdedupe","Find duplicates written differently","Group entries that are the same number in different notations.",[637],"dedupe",{"path":693,"title":694,"description":695,"category":625,"order":146,"uses":696,"demo":697},"\u002Fexamples\u002Fcsv-cleanup","Clean a CSV column","Rewrite a phone column in one notation and flag rows that need a person.",[637],"csv-cleanup",{"path":699,"title":700,"description":701,"category":625,"order":153,"uses":702,"demo":703},"\u002Fexamples\u002Ftype-stats","Count numbers by type","See how many entries are mobile, fixed-line, toll-free, or invalid.",[637,650],"type-stats",{"path":622,"title":623,"description":624,"category":625,"order":224,"uses":705,"demo":706},[637,657],"e164",{"path":615,"title":32,"description":612,"category":610,"order":104,"uses":708,"demo":611},[560],{"path":627,"title":628,"description":629,"category":610,"order":139,"uses":710,"demo":711},[637],"international-input",1796483608062,"73e0e014-4aa7-4f04-8db5-5f7391793162"]