What Is a Facebook UID and Why Does It Matter?
Published
A Facebook UID is the permanent numeric ID behind every account. Learn where it appears, why usernames change but UIDs do not, and who legitimately needs one.
A Facebook UID is the numeric user identifier Facebook assigns to an account when it is created. It is the account's permanent internal address: usernames, display names and profile pictures can all change, but the UID stays fixed for the life of the account. Developers, advertisers and analysts use it to reference an account reliably when a name cannot be trusted.
Definition: the Facebook UID in full
A Facebook UID, short for user identifier and also written as user ID, is the numeric primary key Facebook issues to an account at registration. It is a string of digits, commonly fifteen or sixteen characters on accounts created in recent years, and it is the value Facebook's own systems use internally to refer to that account. Nothing a user does from the settings screen alters it. Changing the display name, claiming a new vanity username, deactivating and reactivating, switching the email address, or moving to a new phone number all leave the UID untouched. Because of that permanence, the UID is the only identifier that can be relied on as a stable reference to an account over time. Where it appears publicly, it appears in URLs, in page markup, and in the responses Meta's Graph API returns to applications a person has authorized. The modern Graph API returns a per-application version of this number rather than one global value, a distinction that matters a great deal in practice.
Why the UID is permanent while usernames are not
Usernames exist for humans. They are short, memorable, and typeable, which means people want to change them when they rebrand, get married, start a business, or simply regret an earlier choice. Facebook allows that, and the vanity URL at facebook.com/yourname moves with the change.
That flexibility is incompatible with being a database key. If a system stored accounts by username, every rename would orphan the record. So Facebook does what essentially every large platform does: it keeps an immutable numeric key behind the mutable human-readable label. The username is a pointer; the UID is the thing pointed at.
This has a direct consequence for anyone keeping records. A spreadsheet of Facebook contacts stored by username degrades silently over months as people rename themselves. The same spreadsheet keyed by UID stays accurate. If you maintain any list of accounts for professional reasons, that single change in approach is the highest-value thing in this article.
Where does a Facebook UID actually show up?
The most visible place is the URL. An account with no vanity username is served at facebook.com/profile.php?id=100001234567890, and the value after id= is the UID in plain sight. Accounts that have claimed a username appear as facebook.com/username instead, which hides the number and is why lookup tools exist.
The number also surfaces in page markup. Facebook's HTML contains identifier fields, and a determined reader can find them, though Meta changes its front-end frequently enough that no specific search string stays dependable. Treat page source as a fallback rather than a method.
Mobile apps occasionally expose it through share links and deep links. And for developers, the authoritative source is the Graph API itself: a call to GET /me with a valid access token returns the user ID for the person who granted that token. The Graph API overview in Meta's developer documentation describes the node-and-edge model this sits inside.
For the common case of an account with a vanity URL, the Facebook UID finder on 2uid.net resolves the username to its numeric identifier without requiring an API key or a developer app.
App-scoped IDs: the detail most guides skip
Before Graph API v2.0, an application that asked about a person received the same global user ID that every other application received. That made it trivial to correlate a person across unrelated apps by matching numbers, which is precisely the kind of cross-service tracking Meta moved to restrict.
Modern behaviour is different. Each application receives an app-scoped user ID: a number unique to the pairing of that person and that application. Two apps looking at the same account see two different values, and neither can derive the other. Meta provides a separate mechanism for the narrow case of linking a person across apps that belong to the same verified business.
Why this matters: a UID you obtained in one context may be meaningless in another. If an API call with a UID returns nothing, scoping is a likely culprit before you start suspecting the endpoint. It also means UIDs harvested in bulk have far less utility than vendors selling such lists tend to imply.
Who legitimately needs a Facebook UID?
The honest answer is a narrower set of people than the search volume suggests. Three groups have real, defensible needs.
Developers building on the Graph API. Any application with Facebook Login handles user IDs as a matter of course: the UID is the key under which you store that person's data in your own database. You do not look these up, you receive them from the authentication flow, and you should store them rather than storing email addresses or names as the identity anchor.
Advertisers building and debugging audiences. Meta's advertising tools accept identifiers for custom audience matching, and anyone running Ads Manager at scale works with Page IDs, ad account IDs, pixel IDs, and user identifiers. Here the UID is a troubleshooting tool as much as a targeting input: when an audience behaves unexpectedly, confirming which object an ID refers to is step one.
Analysts and community managers verifying identity. When two accounts share a display name, or an account has been renamed, the UID settles which one you are looking at. Moderation and brand-protection work runs into this constantly, because impersonation accounts copy names and photos but cannot copy a UID.
What does not belong on that list is bulk collection for unsolicited outreach. Beyond the Terms of Service question, it does not work well: app-scoping limits reuse, and Meta's messaging surfaces are not open to arbitrary numeric targeting.
UID compared with Facebook's other identifiers
| Identifier | What it identifies | Changes over time? | Globally unique or app-scoped |
|---|---|---|---|
| UID (user ID) | A personal account | No | App-scoped in modern Graph API |
| Username / vanity URL | A personal account or Page | Yes, user-editable | Global, but reassignable |
| Page ID | A Page | No | Global |
| Group ID | A Group | No | Global |
| Post ID | A single post | No | Global, often composite |
| Ad account ID | An advertising account | No | Global |
The distinction between user, Page and Group IDs causes enough confusion to deserve its own treatment, which is covered in detail in the piece on Facebook ID versus Page ID versus Group ID.
What a UID does not give you
This deserves saying directly, because a lot of material in this niche implies otherwise. A UID is a reference, not an access credential. It tells you which account you are pointing at. It does not reveal private posts, friend lists set to private, phone numbers, email addresses, or anything else the account owner has restricted. Facebook's permission model governs access to data, and the permission model does not consult whether you know the number.
Nor does a UID let you contact someone. There is no public endpoint that accepts a numeric ID and delivers a message. Claims to the contrary generally describe either a Terms of Service violation or a product that does not work.
Getting UIDs on other platforms
Every major platform has an equivalent, and the details differ more than people expect. Instagram uses a numeric ID sometimes called the PK, covered in the guide to finding an Instagram user ID. TikTok is the trickiest case because it uses two separate identifiers, a numeric user ID and an opaque sec_uid string, explained in the breakdown of TikTok user ID versus sec_uid. YouTube's channel IDs begin with UC and behave differently again. If you work across several networks, the cross-platform guide to social media user IDs puts all of them side by side.
Frequently asked questions
Is a Facebook UID the same as a Facebook ID?
In everyday use, yes. Both terms refer to the numeric identifier for an account. The ambiguity comes from "Facebook ID" also being used loosely for Page and Group identifiers, so UID is the more precise term when you specifically mean a personal account.
Can someone change their Facebook UID?
No. There is no setting for it and no support process that reassigns one. Deleting the account and creating a new one produces a new account with a new UID, which is a different account rather than a changed identifier.
How many digits does a Facebook UID have?
Length varies with when the account was created. Older accounts tend to have shorter numbers, while accounts created after Facebook expanded its ID space commonly show fifteen or sixteen digits beginning with 1000. Do not validate UIDs by length; it is a pattern, not a rule.
Why does my API call with a UID return an error?
The usual causes are app-scoping, a missing or expired access token, a missing permission for the field you requested, or the ID belonging to a Page rather than a user. Confirm the object type first, then the token, then the permissions.
Is looking up a Facebook UID legal?
Resolving a public profile URL to its public numeric identifier is ordinary use of information the platform publishes. What you then do with it is the part that carries obligations: bulk collection, unsolicited messaging, and reselling identifier lists run into Meta's Terms of Service and, depending on where you operate, data protection law.
Does the UID appear in Facebook's own settings?
Not as a labelled field for personal profiles. Page admins can see a Page ID in Meta Business Suite, and developers see their own user ID through the Graph API Explorer, but there is no "your UID is" line in personal account settings.
What is the fastest way to find a UID from a profile link?
If the link contains profile.php?id=, read the number from the URL. If it uses a vanity username, paste it into the 2uid.net Facebook UID finder, which resolves the username to the numeric identifier in one step.