Skip to main content
Mask a phone number, keeping the leading + (if any) plus the first 3 digits and the last 4 digits visible. Example: +13315553374 -> +133xxxxx3374. Inputs that don’t have enough digits to safely mask are returned as xxxx to avoid leaking the entire short value.

Parameters

string
required

Returns

string