phone.number

Generates random phone numbers with support for different formatting styles. Phone numbers use valid area codes (200–999) and exchange codes (200–999) to avoid special service numbers.

Keywords

styleoptional

Controls the formatting of the generated phone number. Must be one of: us,e164, or plain. Defaults tous if not specified.

  • us — US format with parentheses and hyphens: (555) 123-4567
  • e164 — International E.164 format with country code: +15551234567
  • plain — Plain digits with no formatting: 5551234567

Examples

Default US formatting:

{
  "type": "phone.number"
}

E.164 international format:

{
  "type": "phone.number",
  "style": "e164"
}

Plain digit format (useful for database storage):

{
  "type": "phone.number",
  "style": "plain"
}