Your phone number
A page cannot read the phone number of your phone or SIM.
In one line
Can't see your own phone number from a web page
A page cannot read the phone number of your phone or SIM.
No web API returns the device's own number. Proxies: WebOTP reads an SMS code (needs a prompt-free user flow but only the code, only formatted for the origin), Credential Management and Contact Picker give numbers the person chooses.
What it can and can't do
What the user does: You type your number, pick one from a contact picker, or tap Autofill
It can
- Take a one time code from a text message on Android (WebOTP)
- Use a number you type in or pick
- Fill a number from your saved info if you choose it
It cannot
- See the number of your phone or SIM
- See your texts beyond one matching code
- See numbers you did not choose
- Get the code unless the text matches the site
Browser support
| Browser | Status | First version | Note |
|---|---|---|---|
| Chrome | Not supported | Not available | None |
| Edge | Not supported | Not available | None |
| Firefox | Not supported | Not available | None |
| Safari | Not supported | Not available | None |
| Safari on iPhone | Not supported | Not available | None |
| Chrome on Android | Not supported | Not available | None |
| Samsung Internet | Not supported | Not available | None |
How a site asks for it
| API | none |
| How access is granted | not-exposed |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | not applicable |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: none
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
proxy: WebOTP API | string | None | reads a one-time code in an SMS formatted with @domain, not the number | Not listed |
proxy: Contact Picker API | string | None | returns tel values only after a picker the user confirms (Android Chrome 80) | Not listed |
proxy: autocomplete=tel | string | None | fills from saved profile on user action | Not listed |
Technical limits
- PII and SIM swap risk
The story
What it is
A page cannot read the phone number of your phone or SIM.
For you
A site cannot learn your phone number by itself. You type it in, and later it may fill a code that arrives by text. That is all it gets.
For makers
Phone numbers are very sticky IDs, used to link accounts and track people. The web gives no way to read one. Apps ask you to type it, then confirm it with a code.
Where you see it
| Type | Example | Apps |
|---|---|---|
| banking | A bank wanted your number for login and sends a code to the number you type. | None named |
| messaging | A chat site wanted to find friends by number and asks you to enter or import it. | WhatsApp Web |
| rideshare | A ride site verifies your number with a one time code before booking. | None named |
| delivery | A delivery site texts a code to confirm the number you typed. | None named |
| dating | A dating site asks you to verify a number by code instead of reading it. | None named |
| ads | An ad vendor wanted your number to match profiles and gets only hashes you gave. | None named |
| security | A fraud team checks that the number you typed matches the code, not the SIM. | None named |
Risks
- Typing it gives it away
- Codes can be phished
What the platform says
- Google: WebOTP API. Chrome describes filling a one time SMS code for the site after you approve, without giving the number.
Good uses and abuse
Legitimate uses
- None: the browser deliberately withholds it
Known abuse
- Sites attempt proxies to recover it
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 5 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 3 of 5 | How much the user has to do |
| Fingerprint bits | 0 | Rough identifying entropy, when known |
Related capabilities
Related
- Full contact list. Can't see your full contact list; only the contacts you pick
Sources
How well checked: Based on official documentation.