Phone Number Validator

Validate and parse phone numbers. Returns country, type (mobile/fixed/VoIP), and formatted variants in national, international, and E.164 formats.

⚡ 1 credit per call

Try it

Fill in the fields below and hit Send.

Why use this

Phone number formats vary enormously across countries: calling codes, national prefixes, number lengths, carrier ranges. libphonenumber (Google's library, used by Android) handles all of it and returns validity, country, type, and all three standard formats.

Pricing

Any number, any country 1 credit

Request format

{
  "phone": "+353861234567",
  "country": "IE"
}
Field Type Notes
phone string Required. E.164 format preferred (+353861234567). National format accepted with country hint.
country string Optional ISO 3166-1 alpha-2 hint (e.g. IE, US, GB). Only needed for national-format numbers without a + prefix.

Response — valid number

{
  "valid": true,
  "phone": "+353861234567",
  "country": "IE",
  "countryCallingCode": "353",
  "type": "MOBILE",
  "formatted": {
    "national": "086 123 4567",
    "international": "+353 86 123 4567",
    "e164": "+353861234567"
  }
}

Response — invalid number

{ "valid": false, "phone": "+1234" }

Invalid numbers return HTTP 200 with valid: false. This is not an error — the service ran, 1 credit is charged.

Number types

MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, SHARED_COST, VOIP, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL, UNKNOWN

Errors (400, no charge)

Missing or empty phone field only.

API Reference

Endpoint

POST https://api.lightningapi.tools/phone-validator/validate

Required headers

Authorization: Bearer <apiKey>
Content-Type: application/json

Example request

{
  "phone": "+353861234567"
}

Example response

{
  "valid": true,
  "phone": "+353861234567",
  "country": "IE",
  "countryCallingCode": "353",
  "type": "MOBILE",
  "formatted": {
    "national": "086 123 4567",
    "international": "+353 86 123 4567",
    "e164": "+353861234567"
  }
}