HomePhone numbers › Madagascar
● Madagascar · +261

Madagascar phone number validator & formatter

Check whether a Madagascar number is valid, detect its line type, and convert it to E.164, international, or national format — instantly and free. Powered by Google's libphonenumber.

validates in your browser — nothing is sent anywhere
Madagascar phone number  ·  country

Madagascar phone number format

CountryMadagascar (MG)
Country calling code+261
Example number (international)+261 32 12 345 67
National format032 12 345 67
E.164 format+261321234567
RFC 3966 (tel: URI)tel:+261321234567
Example line typemobile

To dial a Madagascar number from abroad, start with the country code +261 followed by the national subscriber number. In E.164 — the format every SMS gateway, CRM, and payment provider expects — the same number is stored as +261321234567: a leading +, the country code, and the national number with no spaces or separators.

Validate Madagascar numbers in your app

The interactive tool above runs entirely in your browser. For server-side validation at scale — sign-up forms, lead cleaning, SMS routing — call the API. One GET request, no SDK, works in any language.

# Validate a Madagascar number via the API
curl "https://phone-validation-and-formatting.p.rapidapi.com/v1/validate?number=%2B261321234567" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: phone-validation-and-formatting.p.rapidapi.com"

Get a free API key →  ·  1,000 free requests/month, no credit card.

Frequently asked questions

What is the country code for Madagascar?

The country calling code for Madagascar is +261. A full number in international (E.164) form looks like +261321234567.

What does a valid Madagascar phone number look like?

A typical Madagascar mobile number is written +261 32 12 345 67 internationally, 032 12 345 67 nationally, or +261321234567 in E.164 format.

How do I validate a Madagascar phone number in code?

Send one GET request to the Phone Validation API with the number and country code "MG". The response tells you whether it is valid, the line type, and every standard format. A free tier is available.

Phone validation for every country

Validity, line-type detection, and every format from a single endpoint — 240+ countries, sub-50ms from the edge.

Start free →

Other countries