Skip to main content

Phone Generator

Generates phone numbers in various formats.

Basic Usage

{
"phone": {"gen": "phone"}
}

Output: Standard phone number (e.g., 555-123-4567)

Options

OptionTypeDescription
formatstringPhone format type

Format Options

FormatDescriptionExample
default (or omitted)Standard phone number555-123-4567
internationalInternational format+1-555-123-4567
cell or mobileMobile phone555-123-4567
extensionPhone extensionx1234

Examples

Standard Phone

{
"phone": {"gen": "phone"}
}

International Format

{
"phone": {"gen": "phone", "format": "international"}
}

Output: +1-555-123-4567

Mobile Phone

{
"mobile": {"gen": "phone", "format": "cell"}
}

Extension

{
"extension": {"gen": "phone", "format": "extension"}
}

Output: x1234

Common Patterns

Contact Information

{
"contacts": {
"count": 100,
"item": {
"id": {"gen": "uuid"},
"name": {"gen": "name.fullName"},
"phone": {"gen": "phone"},
"mobile": {"gen": "phone", "format": "cell"},
"email": {"gen": "internet.emailAddress"}
}
}
}

Business Directory

{
"businesses": {
"count": 50,
"item": {
"id": {"gen": "uuid"},
"name": {"gen": "company.name"},
"phone": {"gen": "phone"},
"fax": {"gen": "phone"},
"extension": {"gen": "phone", "format": "extension"}
}
}
}

User Profiles

{
"users": {
"count": 200,
"item": {
"id": {"gen": "uuid"},
"name": {"gen": "name.fullName"},
"email": {"gen": "internet.emailAddress"},
"homePhone": {"gen": "phone"},
"workPhone": {"gen": "phone"},
"mobile": {"gen": "phone", "format": "mobile"}
}
}
}

Best Practices

  1. Use Appropriate Format: Match format to use case
  2. International for Global: Use international format for multi-country data
  3. Mobile for Cells: Use cell/mobile format for mobile numbers
  4. Multiple Numbers: Generate different types for realistic data

Next Steps