The quickest way to find an X user ID
The simplest method is to use a third-party lookup tool designed for this purpose. Sites like GetDayTrends, Shadowban.eu, and XUserID.com let you paste a username and when ready see the numeric ID attached to that account. These tools work because X's public data includes user IDs — they are not hidden information, just not displayed prominently in the app itself.
If you want to avoid third-party sites, you can also find the ID by inspecting the page source code directly in your browser, though this takes more steps and requires some comfort with technical tools. The third-party route is faster for most people and carries no risk to your account.
Key Takeaways
- Third-party lookup tools like GetDayTrends and XUserID.com show you a user's numeric ID in seconds by searching their username.
- User IDs are public information that X displays in its API and page source, so looking them up does not violate any terms of service.
- If you use the browser method, right-click the profile page, select "View Page Source," and search for "rest_id" to find the numeric ID.
- The numeric ID stays the same even if someone changes their username, making it useful for tracking accounts over time.
Using a third-party lookup tool
Open your web browser and go to one of the established lookup sites. XUserID.com is straightforward: type the username (without the @ symbol) into the search box and press Enter. Within seconds, the page displays the user's numeric ID, account creation date, follower count, and other public profile data.
GetDayTrends works the same way — enter the username and it returns the ID along with tweet statistics. Shadowban.eu focuses more on account health (whether X has shadowbanned the account), but also shows the ID. All three are free and do not require you to log in or create an account.
These tools pull data from X's public API, which is the same data X itself uses. You are not accessing anything private or breaking any rules by using them.
Finding the ID through your browser's developer tools
If you prefer not to use a third-party site, you can find the ID directly on X. Go to the person's profile page in your browser. Right-click anywhere on the page and select "View Page Source" (the exact wording varies slightly by browser — Firefox calls it "View Page Source," Chrome calls it "View Page Source," Safari calls it "Show Page Source").
A new tab or window opens showing the raw HTML code of the page. Press Ctrl+F (or Cmd+F on Mac) to open the search box within that code. Type "rest_id" and press Enter. The browser highlights the line containing the user ID. It appears as a long number in quotes, like "rest_id":"1234567890". The number after the colon is the user ID.
This method works on any device and does not depend on external websites, but it is slower than using a lookup tool and requires you to read code. Most people find the third-party route easier.
Why user IDs matter and how they differ from usernames
X assigns every account a unique numeric ID when it is created. This ID never changes, even if the person changes their username multiple times. Usernames can be reused after an account is deleted, but the numeric ID is permanent and unique to that specific account.
This distinction matters if you are tracking a specific account over time. If someone changes their username, their ID stays the same, so the ID is the reliable way to confirm you are looking at the same person. Developers and researchers use IDs for this reason — they build tools and databases that reference accounts by ID rather than by username.
What to do if the lookup tool shows no results
If you search for a username and the tool returns no results, the account either does not exist, has been suspended, or the username is spelled differently than you think. Double-check the spelling — X usernames are case-insensitive, so capitalization does not matter, but missing or extra letters do.
If the account is suspended, X may have removed it from public search, so the lookup tool cannot find it. If you are certain the username is correct and the account exists, try a different lookup tool — one site may have fresher data than another, though this is rare.
Using the ID once you have it
Once you have the numeric ID, you can use it to construct direct links to the account or to reference the account in code or databases. The URL format is twitter.com/i/user/[ID] — replace [ID] with the numeric ID. This link takes you directly to that user's profile, regardless of whether you know their current username.
If you are building a tool or script that tracks X accounts, storing the ID rather than the username makes your data more reliable. The ID persists even if the person changes their username or deletes and recreates their account.
Frequently Asked Questions
Is it legal to look up someone's user ID?
Yes. User IDs are public information that X displays in its API and page source. Looking up a user ID does not violate X's terms of service or any law. The information is the same data X itself uses.
Can I find a user ID if the account is private?
Yes. Privacy settings on X control who can see tweets and follow the account, but the user ID and basic profile information remain public. Lookup tools can find the ID of a private account the same way they find a public one.
What if someone has a very new account?
Lookup tools may take a few hours to index very new accounts, but the ID exists when ready. If a tool does not find a brand-new account, wait a few hours and try again, or use the browser method to find it manually.
Do I need to be logged into X to find a user ID?
No. User IDs are public data, so you can find them whether you have an X account or not. Third-party lookup tools and the browser method both work without logging in.
Can the user see that I looked up their ID?
No. Looking up a user ID generates no notification and leaves no trace on the account. The user has no way to know you searched for their ID.