{
  "url": "https://phonelookup.dev/country/mg",
  "iso": "MG",
  "slug": "mg",
  "name": "Madagascar",
  "callingCode": 261,
  "exitCode": "00",
  "preferredExitCode": "",
  "trunkPrefix": "0",
  "mobilePortable": false,
  "mobileStarts": [
    "032",
    "033",
    "034",
    "035",
    "036",
    "037",
    "038",
    "039"
  ],
  "lineTypes": [
    {
      "type": "mobile",
      "label": "Mobile",
      "regex": "3[2-9]\\d{7}",
      "lengths": [
        9
      ],
      "localOnlyLengths": [],
      "exampleNational": "032 12 345 67",
      "exampleInternational": "+261 32 12 345 67",
      "exampleE164": "+261321234567"
    },
    {
      "type": "fixedLine",
      "label": "Fixed line",
      "regex": "2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}",
      "lengths": [
        9
      ],
      "localOnlyLengths": [
        7
      ],
      "exampleNational": "020 21 234 56",
      "exampleInternational": "+261 20 21 234 56",
      "exampleE164": "+261202123456"
    },
    {
      "type": "voip",
      "label": "VoIP",
      "regex": "22\\d{7}",
      "lengths": [
        9
      ],
      "localOnlyLengths": [],
      "exampleNational": "022 12 345 67",
      "exampleInternational": "+261 22 12 345 67",
      "exampleE164": "+261221234567"
    }
  ],
  "formats": {
    "e164": "+261321234567",
    "international": "+261 32 12 345 67",
    "national": "032 12 345 67",
    "rfc3966": "tel:+261-32-12-345-67"
  },
  "carriers": [
    {
      "name": "Yas",
      "lineType": "mobile",
      "prefixCount": 3,
      "ranges": [
        "034",
        "036",
        "038"
      ]
    },
    {
      "name": "Airtel",
      "lineType": "mobile",
      "prefixCount": 2,
      "ranges": [
        "033",
        "035"
      ]
    },
    {
      "name": "Orange",
      "lineType": "mobile",
      "prefixCount": 2,
      "ranges": [
        "032",
        "037"
      ]
    },
    {
      "name": "Blueline",
      "lineType": "mobile",
      "prefixCount": 1,
      "ranges": [
        "039"
      ]
    }
  ],
  "sandbox": {
    "input": "+261321234567",
    "valid": true,
    "type": "Mobile",
    "carrier": "Orange",
    "region": "MG",
    "formats": {
      "e164": "+261321234567",
      "international": "+261 32 12 345 67",
      "national": "032 12 345 67",
      "rfc3966": "tel:+261-32-12-345-67"
    },
    "parts": {
      "countryCode": "+261",
      "destinationCode": "32",
      "destinationKind": "network code",
      "subscriber": "1234567"
    }
  },
  "faq": [
    {
      "question": "How many digits does a phone number in Madagascar have?",
      "answer": "Mobile numbers have 9 national digits. Fixed line numbers have 9 national digits (7 when dialled locally). That is the national number, without the country code +261 and without the trunk prefix 0."
    },
    {
      "question": "What is the country code for Madagascar?",
      "answer": "+261. From abroad, dial your own exit code, then 261, then the national number without its trunk prefix 0. From inside Madagascar, the exit code for international calls is 00."
    },
    {
      "question": "Which prefixes are mobile numbers in Madagascar?",
      "answer": "Mobile numbers start with 032, 033, 034, 035, 036, 037, 038 or 039 in national form; the mobile regular expression on this page gives the exact ranges (example: 032 12 345 67). The carrier table shows which prefix blocks were allocated to which operator."
    },
    {
      "question": "Can a mobile number in Madagascar be ported to another carrier?",
      "answer": "Not on record. The plan data this page is built from does not list mobile number portability for Madagascar, so the carrier a prefix was allocated to is likely, not certainly, the carrier serving the number. Only a live carrier lookup (an HLR or MNP query) confirms it."
    }
  ],
  "meta": {
    "dataAsOf": "2026-10-25",
    "dataPoints": 17,
    "references": [
      {
        "authority": "ITU",
        "title": "National numbering plan: Madagascar",
        "url": "https://www.itu.int/oth/T020200007F/en"
      }
    ]
  },
  "neighbours": [
    "https://phonelookup.dev/country/re.json",
    "https://phonelookup.dev/country/yt.json",
    "https://phonelookup.dev/country/zm.json",
    "https://phonelookup.dev/country/zw.json",
    "https://phonelookup.dev/country/mz.json",
    "https://phonelookup.dev/country/na.json",
    "https://phonelookup.dev/country/bi.json",
    "https://phonelookup.dev/country/mw.json",
    "https://phonelookup.dev/country/ls.json",
    "https://phonelookup.dev/country/ug.json",
    "https://phonelookup.dev/country/bw.json",
    "https://phonelookup.dev/country/tz.json"
  ]
}
