[{"data":1,"prerenderedAt":375,"buildId":376},["ShallowReactive",2],{"docs-navigation-en":3,"examples-en":30,"page-\u002Fdocs\u002Flibphonenumber":131,"surround-\u002Fdocs\u002Flibphonenumber":370},[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,[31,40,47,55,63,71,77,84,92,98,104,110,117,125],{"path":32,"title":33,"description":34,"category":35,"order":36,"uses":37,"demo":39},"\u002Fexamples\u002Fvalidate-input","Validate a phone number field","Accept full-width input, reject numbers that do not exist, and save one notation.","forms",1,[38],"normalize","validate-input",{"path":41,"title":42,"description":43,"category":35,"order":44,"uses":45,"demo":46},"\u002Fexamples\u002Fpaste-labels","Accept pasted labels and notes","Take the main number from lines like ",2,[38],"paste-labels",{"path":48,"title":49,"description":50,"category":35,"order":51,"uses":52,"demo":54},"\u002Fexamples\u002Fmobile-only","Accept mobile numbers only","Use the type to decide whether a number can receive SMS.",3,[38,53],"type","mobile-only",{"path":56,"title":57,"description":58,"category":35,"order":59,"uses":60,"demo":62},"\u002Fexamples\u002Ftel-link","Make tel: links","Link numbers in their international form, and keep domestic-only numbers dialable.",4,[38,61],"international","tel-link",{"path":64,"title":65,"description":66,"category":67,"order":36,"uses":68,"demo":70},"\u002Fexamples\u002Fextract-inquiry","Find numbers in a message","Pick every phone number out of a message, in the order it appears.","text",[69],"extract","extract-inquiry",{"path":72,"title":73,"description":74,"category":67,"order":44,"uses":75,"demo":76},"\u002Fexamples\u002Fbusiness-card","Read a business card in kanji digits","Find numbers written with 〇一二三, as on vertical business cards.",[69],"business-card",{"path":78,"title":79,"description":80,"category":67,"order":51,"uses":81,"demo":83},"\u002Fexamples\u002Fcompany-page","List the numbers on a company page","Find TEL and FAX numbers and drop duplicates written in other notations.",[69,82],"digits","company-page",{"path":85,"title":86,"description":87,"category":88,"order":36,"uses":89,"demo":91},"\u002Fexamples\u002Fdisplay-format","Store digits, show hyphens","Format stored digits with the groups from the numbering table.","data",[38,90],"national","display-format",{"path":93,"title":94,"description":95,"category":88,"order":44,"uses":96,"demo":97},"\u002Fexamples\u002Fdedupe","Find duplicates written differently","Group entries that are the same number in different notations.",[38],"dedupe",{"path":99,"title":100,"description":101,"category":88,"order":51,"uses":102,"demo":103},"\u002Fexamples\u002Fcsv-cleanup","Clean a CSV column","Rewrite a phone column in one notation and flag rows that need a person.",[38],"csv-cleanup",{"path":105,"title":106,"description":107,"category":88,"order":59,"uses":108,"demo":109},"\u002Fexamples\u002Ftype-stats","Count numbers by type","See how many entries are mobile, fixed-line, toll-free, or invalid.",[38,53],"type-stats",{"path":111,"title":112,"description":113,"category":88,"order":114,"uses":115,"demo":116},"\u002Fexamples\u002Fe164","Convert to E.164","Pass numbers to SMS gateways, CRMs, and libphonenumber in international form.",5,[38,61],"e164",{"path":118,"title":119,"description":120,"category":121,"order":36,"uses":122,"demo":124},"\u002Fexamples\u002Fplan-check","Reject numbers that cannot exist","Numbers missing from the numbering plan or the MIC tables are invalid.","rules",[123],"isValid","plan-check",{"path":126,"title":127,"description":128,"category":121,"order":44,"uses":129,"demo":130},"\u002Fexamples\u002Finternational-input","Read numbers written for abroad","Accept +81 notation, including the bracketed (0), for the types that can be dialed from abroad.",[38],"international-input",{"id":132,"title":22,"body":133,"description":364,"extension":365,"meta":366,"navigation":367,"path":23,"seo":368,"stem":24,"__hash__":369},"docs_en\u002Fdocs\u002F4.libphonenumber.md",{"type":134,"value":135,"toc":356},"minimark",[136,148,160,165,168,172,183,256,259,263,306,332,336,339,343],[137,138,139,140,147],"p",{},"Google's ",[141,142,146],"a",{"href":143,"rel":144},"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Flibphonenumber",[145],"nofollow","libphonenumber"," is a widely used library for numbers of many countries. For Japanese numbers, the two libraries format the same way. They differ in which numbers they accept and in how they read Japanese text.",[137,149,150,151,155,156,159],{},"We compared libphonenumber 9.0.45 for Java and libphonenumber-js 1.13.18 in December 2026, parsing with region ",[152,153,154],"code",{},"JP"," and checking with ",[152,157,158],{},"isValidNumber",".",[161,162,164],"h2",{"id":163},"formatting-is-the-same","Formatting is the same",[137,166,167],{},"For all 41,987 fixed-line blocks in the MIC tables, libphonenumber placed the hyphens exactly as japan-phone does. Mobile, 050, 0120, 0800, and 0570 numbers matched too.",[161,169,171],{"id":170},"validity-differs","Validity differs",[137,173,174,175,178,179,182],{},"libphonenumber accepted 27,113 fixed-line blocks that are not in the MIC tables. In 11,749 of them, the digit after the area code is ",[152,176,177],{},"0"," or ",[152,180,181],{},"1","; the MIC tables have no such block. japan-phone rejects them all.",[184,185,186,201],"table",{},[187,188,189],"thead",{},[190,191,192,196,199],"tr",{},[193,194,195],"th",{},"Input",[193,197,198],{},"japan-phone",[193,200,146],{},[202,203,204,218,229,240],"tbody",{},[190,205,206,212,215],{},[207,208,209],"td",{},[152,210,211],{},"03-1234-5678",[207,213,214],{},"Invalid",[207,216,217],{},"Valid",[190,219,220,225,227],{},[207,221,222],{},[152,223,224],{},"092-123-4567",[207,226,214],{},[207,228,217],{},[190,230,231,236,238],{},[207,232,233],{},[152,234,235],{},"090--1234-5678",[207,237,214],{},[207,239,217],{},[190,241,242,247,249],{},[207,243,244],{},[152,245,246],{},"090-ABCD-5678",[207,248,214],{},[207,250,251,252,255],{},"Java converts it to ",[152,253,254],{},"090-2223-5678","; JavaScript cannot parse it",[137,257,258],{},"The MIC tables have had no blocks added in the six years we checked (from December 2020), so we expect rejecting blocks outside them to rarely reject a real number.",[161,260,262],{"id":261},"japanese-text-differs","Japanese text differs",[184,264,265,275],{},[187,266,267],{},[190,268,269,271,273],{},[193,270,195],{},[193,272,198],{},[193,274,146],{},[202,276,277,292],{},[190,278,279,284,289],{},[207,280,281],{},[152,282,283],{},"〇九〇－一二三四－五六七八",[207,285,286],{},[152,287,288],{},"090-1234-5678",[207,290,291],{},"Cannot parse",[190,293,294,299,304],{},[207,295,296],{},[152,297,298],{},"電話番号：03-5253-8111（内線２１‐２１４）",[207,300,301],{},[152,302,303],{},"03-5253-8111",[207,305,291],{},[137,307,308,309,312,313,315,316,318,319,321,322,325,326,328,329,331],{},"libphonenumber can also find numbers in text (",[152,310,311],{},"findNumbers","). In most of our examples it found the same numbers as ",[152,314,69],{},". ",[152,317,69],{}," also reads kanji digits and skips numbers that do not fit the numbering plan or the MIC tables. Where one number ends and the next begins can also differ with the input and the ",[152,320,311],{}," settings. For example, in ",[152,323,324],{},"03-5253-8111／03-5253-8111",", ",[152,327,69],{}," found two numbers and ",[152,330,311],{}," found none.",[161,333,335],{"id":334},"sources","Sources",[137,337,338],{},"libphonenumber's metadata for Japan lists the same MIC page among its sources, together with the ITU and a third-party website. Its rules are summarized as regular expressions, and the version of each source is not recorded. japan-phone generates its table by program from the MIC files and records the URL, SHA-256, and date of each file.",[161,340,342],{"id":341},"using-both","Using both",[344,345,346,350],"ul",{},[347,348,349],"li",{},"Use japan-phone to validate Japanese numbers strictly, and libphonenumber when you also handle numbers from other countries.",[347,351,352,353,355],{},"Pass numbers between them in E.164: japan-phone's ",[152,354,61],{}," field.",{"title":357,"searchDepth":44,"depth":44,"links":358},"",[359,360,361,362,363],{"id":163,"depth":44,"text":164},{"id":170,"depth":44,"text":171},{"id":261,"depth":44,"text":262},{"id":334,"depth":44,"text":335},{"id":341,"depth":44,"text":342},"Where japan-phone and Google's libphonenumber agree, where they differ, and how to use both.","md",{},true,{"title":22,"description":364},"lbRm5RpPPdBSjnPTlqFJvqHR8HsX7vWvXK-sJxugdNI",[371,373],{"title":18,"path":19,"stem":20,"description":372,"children":-1},"What normalize and extract accept, and what they reject on purpose.",{"title":26,"path":27,"stem":28,"description":374,"children":-1},"Where the numbering table comes from, its date, and how it is kept up to date.",1796483607422,"73e0e014-4aa7-4f04-8db5-5f7391793162"]