Spec 0.14.0
Madagascar phone numbers: rules and sources
Reads, checks and formats Malagasy phone numbers, mobile and fixed (country code +261).
-
A number has 9 significant digits after
+261: a 2-digit operator code, then 7 digits. -
Accepted spellings of the same number
34 12 345 67:034 12 345 67,+261 34 12 345 67,00261 34 12 345 67,261 34 12 345 67,34 12 345 67.0is the national trunk prefix;00is the international prefix.- Spaces (including non-breaking and other Unicode spaces),
-,.,(and)are ignored. A+is allowed only as the first character. - Any other character (letters,
_, full-width digits) isINVALID_FORMAT. - The 9 significant digits never start with
0, so034 12 345 6(one digit short) isINVALID_FORMAT, not a 9-digit number with operator03. - Input longer than 32 characters is
INVALID_FORMAT, so parsers never scan unbounded text.
-
Operator codes 30–39 are mobile. Assigned codes:
Code Operator Assigned 32 Orange Madagascar 2013 plan 33 Airtel Madagascar 2013 plan 34 Yas Madagascar (formerly Telma) 2013 plan 35 Airtel Madagascar 22 Jun 2026 36 Yas Madagascar (formerly Telma) 2026 37 Orange Madagascar 21 Oct 2022 38 Yas Madagascar (formerly Telma) 21 Oct 2022 39 Blueline (MVNO) 21 Aug 2013 Codes 20–29 are fixed lines (2013 plan):
20is the Yas (Telecom Malagasy) fixed network,22is Gulfsat Madagascar VSAT. After20comes a zone digit (2 and 4 Antananarivo, 5 Toamasina, 6 Mahajanga, 7 Fianarantsoa, 8 Antsiranana, 9 Toliara), then 6 subscriber digits. A geographic number gives its town when the plan lists it (020 53 …→ Toamasina); otherwise itsareaisnull. A well-formed number with any other code, or a20number with an unlisted zone, isUNKNOWN_OPERATOR. -
Formats (
formatPhone):Format Output for 0341234567e164+261341234567international+261 34 12 345 67national034 12 345 67Any other format name is
INVALID_TYPE. -
Non-string input is
INVALID_TYPEforparsePhoneandformatPhone;isValidPhonenever throws and returnsfalse.
Parsed value
Section titled “Parsed value”e164: '+261341234567'nationalNumber: '341234567'operator: yastype: mobile # or fixedarea: null # for a geographic fixed number: { name: Toamasina, province: Toamasina }Sources
Section titled “Sources”- ITU, national numbering plan for Madagascar (+261), communications from OMERT (27.VIII.2013, 21.VIII.2013) and ARTEC (21.X.2022): https://www.itu.int/dms_pub/itu-t/oth/02/02/T020200007F0002PDFF.pdf
- ARTEC, Plan national de numérotation: https://www.artec.mg/plan-national-de-numerotation/ (lists 32 Orange, 33 Airtel, 34 and 38 Telma; did not load over HTTPS when checked on 2026-11-23 because of a certificate error).
- Prefix 35 (Airtel Madagascar), numbers on sale since 22 June 2026: TechAfrica News, https://techafricanews.com/2026/06/22/airtel-madagascar-launches-new-035-prefix-to-support-network-growth/ (also reported by CapMad and Telecompaper). Not in the ITU filing yet.
- Prefix 36 (Yas Madagascar): announcement on the operator’s official Facebook page (“Tonga ny préfixe 036, manampy ny 034 sy 038”), https://www.facebook.com/YasMadagasikara/posts/-vaovao-ao-aminny-yas-madagascar-tonga-ny-pr%C3%A9fixe-036-manampy-ny-034-sy-038-1-00/1405609748336274/. Not in the ITU filing yet.
- Fixed lines, zones and towns: the 27.VIII.2013 plan in the ITU document above.
- Telma renamed Yas Madagascar on 26 November 2024: L’Express de Madagascar,
https://www.lexpress.mg/2024/11/telephonie-mobile-telma-change-de-nom.html.
The operator id changed from
telmatoyasin spec 0.6.0.
Recorded disagreements
Section titled “Recorded disagreements”- Grouping for 39. The 2013 Blueline communication writes
+261 39 XXX XXXX; the 2013 plan and the 2022 communication write+261 3X XX XXX XX. The data uses the 2-2-3-2 grouping for every operator so one number always looks the same. - Is 39 still active? The ITU record does not withdraw 39. Until an official withdrawal is published, the data keeps it.
- 37 on the ARTEC page. The ARTEC web page does not list 37; the ITU communication of 21 Oct 2022 assigns it to Orange Madagascar. The data follows the ITU communication, which is the later and formal notice.