---
schema_version: "1"
id: edf4cfe6682a7e7eb47687e6ff63774d69d57440b2e5329c47bab7bb649f33ba
title: IsPhoneNumber()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/utilities/mc-ampscript-reference-utilities-is-phone-number.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-is-phone-number.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 243c98765a237dd00884fdd2293cb4100844ff38a96b1b6fe764fe65ef6a0d5b
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# IsPhoneNumber()

Tests whether the supplied parameter is a valid phone number in the North American Numbering Plan (NANP). If the phone number is valid, the function returns `true`. Otherwise, it returns false.

The NANP is used in 25 countries, regions, and territories, the majority of which are in North America and the Caribbean. These locations include the United States and its territories, Canada, and several countries in the Caribbean, the North Atlantic, Polynesia, and Micronesia.

Phone numbers that aren’t part of the NANP always produce a `false` result. NANP phone numbers produce a `false` result if they contain any characters other than numbers, parentheses, hyphens, periods, or spaces. See the [Usage](#usage) section for more information.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
IsPhoneNumber(phoneNumber)
```

The `IsPhoneNumber()` function has one parameter:

- `phoneNumber` (string): Required. A variable or function to test for a null value.

## Known Issues

The `IsPhoneNumber()` function returns `true` for some phone numbers that begin with `922` and `926`. When the function identifies an invalid phone number as valid, the entire batch fails.

## Usage

For best results, only include numbers when you call this function.

```
IsPhoneNumber(6585550142)
```

The example returns a `true` result.

Characters other than spaces, dots, dashes, or parentheses produce a `false` result, even if the number is a valid NANP phone number.

```
IsPhoneNumber(+16585550142)
```

This example uses the same phone number as the previous example, but it includes a plus sign, so it returns `false`.

## Result Table

This table shows several function calls and the results of each one.

| Function                          | Result  | Notes                                                                                                      |
| --------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `IsPhoneNumber("647 555 0123")`   | `true`  | This is a valid Canadian phone number.                                                                     |
| `IsPhoneNumber("425.555.0185")`   | `true`  | This is a valid US phone number.                                                                           |
| `IsPhoneNumber("(829) 555-0142")` | `true`  | This is a valid phone number in the Dominican Republic, which is part of the NANP.                         |
| `IsPhoneNumber("+14255550142")`   | `false` | This is a valid US phone number, but it returns `false` because it includes a plus sign.                   |
| `IsPhoneNumber("0161 496 0009")`  | `false` | This is a valid UK phone number. The function returns `false` because it isn’t part of the NANP.           |
| `IsPhoneNumber("82 517 460 123")` | `false` | This is a valid South Korean phone number. The function returns `false` because it isn’t part of the NANP. |

## See Also

- [North American Numbering Plan](https://en.wikipedia.org/wiki/North_American_Numbering_Plan) on Wikipedia
