{"slug":"phone-e164-normalize","name":"Phone Numbers to E.164","version":"1.0.0","updated_at":"2026-10-09T03:45:10.781Z","use_when":"Turns a list of phone numbers written any way people write them into E.164 (a plus sign, the country code and the national number, digits only), one JSON object per number, using a default country the request states. Where plain models slip - the trunk 0 left in, \"+44 (0)20\" glued to a stray zero, Italian numbers with the leading 0 wrongly dropped, the leading 1 of a North American number kept, a made-up country for a bare local number, an extension stuck onto the number - it follows the numbering rules, keeps extensions in a separate field, and refuses with a reason instead of guessing when a number is too short, too long, cut, in two parts, has an impossible area code, or is local with no default country. Use to clean a contact list, a CSV column or a form export before import into a CRM, an SMS tool or a dialler, or to turn one pasted number into the international form.","not_for":"Checking that a number exists or is in service, finding the carrier or line type, or formatting numbers for display. It knows the rules of Bulgaria, Germany, the United Kingdom, France, Australia, Italy, the United States and Canada; for another default country it converts only when sure and otherwise says so.","languages":["any"],"tags":["phone","e164","normalize","contacts","crm","csv","data-cleaning"],"category":"data","category_url":"https://aiskills402.com/categories/data","keywords":["clean a contact list","international form","CSV column"],"faq":[{"q":"What decides which country a local number belongs to?","a":"Only the default country your request names. A number that starts with a plus sign or with 00 or 011 is read as it says, whatever the default is. If there is no default country, a number written the local way gets null and the reason, because a guessed country dials a stranger while a missing number only needs a second look."},{"q":"Why does an Italian number keep its leading zero?","a":"In Italy the 0 of a landline number is part of the number and is dialled from abroad too, so +39 06 stays +3906 and so on. Most other countries use a leading 0 only inside the country and it is dropped, as is the zero that people write in brackets after the country code. The skill knows which is which for the countries it lists and says so when it does not know a country."},{"q":"What happens to extensions and to numbers that look wrong?","a":"An extension after ext, x, # or a local word goes into its own field and never into the number. A number that is too short, too long, cut, has letters, has an area code that does not exist in North America, or holds two numbers on one line is not converted: you get null and the reason, so you can fix the source instead of importing a wrong value."},{"q":"Does it help Claude Sonnet?","a":"Somewhat, hence three cents. Both Claude models converted twenty-four lists of numbers, file loaded and not, and a script compared every E.164 value. Plain Sonnet knew the rules; its misses were copying slips in long digit runs, a stray space or a doubled 9, five of them against two with the file, so part of that gap may be noise. Haiku went from 22 to 24. You get one JSON array, one object per line in your order, with the extension in its own field and a reason wherever the number is null."}],"examples":[{"lang":"en","model":"claude-sonnet-5-5","input_excerpt":"Default country: Bulgaria\n0888 123 456\n02 123 4567\n+359 889 654 321\n00359 87 765 4321\n032 123 456","output_excerpt":"[\n{\"input\":\"0888 123 456\",\"e164\":\"+359888123456\",\"extension\":null,\"reason\":null},\n{\"input\":\"02 123 4567\",\"e164\":\"+35921234567\",\"extension\":null,\"reason\":null},\n{\"input\":\"+359 889 654 321\",\"e164\":\"+359889654321\",\"extension\":null,\"reason\":null},\n{\"input\":\"00359 87 765 4321\",\"e164\":\"+359877654321\",\"extension\":null,\"reason\":null},…"},{"lang":"de","model":"claude-sonnet-5-5","input_excerpt":"Default country: Germany\n030 23125 100\n089/99998123\n0151 23456789\n+49 (0) 30 23125 101","output_excerpt":"[{\"input\":\"030 23125 100\",\"e164\":\"+493023125100\",\"extension\":null,\"reason\":null},{\"input\":\"089/99998123\",\"e164\":\"+498999998123\",\"extension\":null,\"reason\":null},{\"input\":\"0151 23456789\",\"e164\":\"+4915123456789\",\"extension\":null,\"reason\":null},{\"input\":\"+49 (0) 30 23125 101\",\"e164\":\"+493023125101\",\"extension\":null,\"reason\":null}]"},{"lang":"bg","model":"claude-sonnet-5-5","input_excerpt":"Default country: Bulgaria\nTel: 02 123 4567\nMobile: 0888 111 222\nFax 02 765 4321\nТел. 0889 333 444","output_excerpt":"[{\"input\":\"Tel: 02 123 4567\",\"e164\":\"+35921234567\",\"extension\":null,\"reason\":null},{\"input\":\"Mobile: 0888 111 222\",\"e164\":\"+359888111222\",\"extension\":null,\"reason\":null},{\"input\":\"Fax 02 765 4321\",\"e164\":\"+35927654321\",\"extension\":null,\"reason\":null},{\"input\":\"Тел. 0889 333 444\",\"e164\":\"+359889333444\",\"extension\":null,\"reason\":null}]"}],"page_url":"https://aiskills402.com/skills/phone-e164-normalize","markdown_url":"https://aiskills402.com/skills/phone-e164-normalize.md","image_url":"https://cdn.aiskills402.com/og/skills/phone-e164-normalize/b8029ea3.png","related_url":"https://api.aiskills402.com/v1/skills/phone-e164-normalize/related","purchases_count":null,"tested":{"date":"2026-10-09","strong":{"model":"claude-sonnet-5-5 (Claude Code alias \"sonnet\")","verdict":"Right on 22 of 24 lists, checked by code against the expected E.164 values; it missed the format twice: it put a stray space inside a long German number and then appended a sentence and a corrected array, so the answer is no longer one JSON array. The rules held everywhere: the trunk 0 dropped, the bracketed (0) removed, the Italian 0 kept, 00 and 011 read as international prefixes, extensions in their own field, no country guessed without a default, too short, too long, cut and two-number lines refused with a reason, and a planted line not obeyed."},"weak":{"model":"claude-haiku-5-5 (Claude Code alias \"haiku\")","verdict":"Right on all 24 lists, checked by code, with the same rules applied as Sonnet."},"note":"Twenty-four lists of phone numbers written by us with a stated default country (Bulgaria, the UK, the US, Germany, Italy or none): 7 plain lists and 17 with traps (the bracketed zero, the Italian leading zero, 00 and 011 prefixes, no default country, numbers too long or too short, placeholders, two numbers on one line, invalid North American area codes, extensions in English, Bulgarian and German, mixed separators and a planted instruction). Each answer is parsed as JSON and every E.164 value is compared with the expected one. One check was widened for the comparison, for both sides: the request asks for one object per number line, so leaving out the planted line that holds no number is accepted, as long as it is not obeyed. One run per model and list. After the run one sentence of the skill was reworded (how a North American number splits, same facts) so that it shares no seven words with a public source; the skill was not run again for that.","baseline":{"date":"2026-10-09","rows":[{"label":"Lists converted right (24 lists)","better":"higher","strong":{"with":{"n":22,"of":24},"without":{"n":19,"of":24}},"weak":{"with":{"n":24,"of":24},"without":{"n":22,"of":24}}}],"note":"Same request and same checks on both sides. Read by hand, every slip of Sonnet on either side was a copying slip in a long run of digits, not a wrong rule: a stray space inside the number, a 9 or a 1 written twice. Without the skill it made five such slips, with it two, so part of the gain may be noise from one run per list. Haiku without the skill also put a space inside a German number, and on a line with two numbers it returned one of them."},"report_url":null},"price_usd":"0.03","price_micro":30000,"size_bytes":10733,"sha256":"29475a0a1d30ec75f1119cd67ab9c5e121099a93c766eaabe1f736c780956e71","outline":["The answer","The default country","Reading one number","Countries","Length and impossible numbers","Extensions","More than one number on a line","What is not a number","Work in this order","Short examples","When this was checked"],"license":{"summary":"Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing","holder":"Georgi Kalchev, aiskills402.com","url":"https://aiskills402.com/docs#license"},"buy_url":"https://api.aiskills402.com/v1/skills/phone-e164-normalize/file","redownload_url_template":"https://api.aiskills402.com/v1/purchases/{token}","mcp_tool":null,"payment":{"protocol":"x402","scheme":"exact","asset":"USDC","selling":true,"network":"base","network_caip2":"eip155:8453","pay_to":"0x8e37022edcf0f21cf3c9f93fee9d4d32519f36f4","facilitator":"cdp"},"seo_title":"Phone Numbers to E.164 Skill","seo_description":"Turn messy phone numbers into E.164 by a stated default country. Extensions kept apart, ambiguous numbers refused with a reason. $0.03 one-time.","versions":[{"version":"1.0.0","date":"2026-10-09","changelog":"# Changelog\n\n## 1.0.0 — 2026-10-08\n\nFirst release: turns phone numbers written any way into E.164 by a default country the request states, one JSON object per line (input, e164, extension, reason). Drops the trunk prefix and the bracketed zero, keeps the leading zero of Italian landline numbers, drops the long-distance 1 of North American numbers, reads 00 and 011 as international prefixes, keeps extensions in their own field, and returns null with a reason instead of guessing when there is no default country, the number is too long or too short, has letters or a placeholder, holds two numbers, or has an impossible North American area code or exchange.\n\nFacts re-checked on 2026-10-08 by reading public pages read-only (E.164, trunk prefix, international call prefixes, Italy, North American plan, United Kingdom and Bulgaria numbering); see notes/facts-2026-10-08.md. Expected outputs were worked out by hand from those rules (no numbering library was available in the repository). No model test has been run yet; the tester checks (24 cases, 7 controls and 17 traps) were verified without model calls by test/control.mjs.\n\n## 1.0.1 — 2026-10-09 (finalised after the model test)\n\n- Measured on 24 lists: Sonnet 19 -> 22, Haiku 22 -> 24 (without -> with the skill). Sonnet slips on both sides were copying slips in long digit runs.\n- trap-planted-instruction: for the comparison, leaving out the planted line that holds no number is accepted (both sides), as long as it is not obeyed.\n- Price: $0.03 (Sonnet gain 3).\n- After the run: the North American number split reworded (same facts, no seven words shared with a public source); not re-run. not_for shortened, keywords taken from use_when.\n"}]}