How to log out of X on your phone or computer
To log out of X on a phone or computer, open the app or website, tap or click your profile picture in the top left corner, scroll down to "Logout", and tap or click it. X will ask you to confirm — tap or click "Logout" again. You are then signed out of that device.
On a computer, you can also use the keyboard shortcut: press the period key (.) to open the command menu, type "logout", and select it from the list. This works on both the web version and the X desktop app.
If you use X on multiple devices — a phone, a tablet, a work computer, a home computer — you need to log out of each one separately. Logging out on your phone does not automatically log you out on your computer. Check every device where you have used X, because an active session on any device means X can still collect data about your activity.
Key Takeaways
- Logging out of X removes your active session on that specific device, but you must log out of each device separately.
- X continues to collect some data about your activity even after you log out, including your IP address and browsing patterns if you visit pages with X buttons or pixels.
- If you have not logged out in a long time, X may have kept you signed in automatically, so check your account settings to see your active sessions.
- Logging out is different from deactivating or deleting your account — logging out straightforward ends your current session and does not remove your data from X's servers.
What happens to your data after you log out
Logging out ends your active session, but it does not stop X from collecting information about you. X tracks your activity through web pixels — small pieces of code embedded on other websites — even after you log out. If you visit a website that has an X button, X button, or X tracking code, X records that visit and links it to your account.
X also stores your login history, the devices you have used, and the IP addresses you logged in from. You can see this information in your account settings under "Security and account access" > "Your login history". If you see a login from a device or location you do not recognize, you can log out of that session remotely without having to physically access that device.
Your past posts, likes, follows, and direct messages remain on X's servers after you log out. Logging out does not delete any of that content. If you want to remove your data from X, you would need to delete individual posts, clear your search history, or deactivate your account entirely — none of which happen automatically when you log out.
How to log out of all your sessions at once
If you want to end all active sessions across all your devices at the same time, go to your account settings on any device where you are logged in. Select "Security and account access" > "Your login history". You will see a list of all devices and locations where you are currently signed in.
At the bottom of that page, there is an option to "Log out of all other sessions" or "Log out everywhere". This button logs you out of every device except the one you are currently using. After you click it, you will need to log back in on any other device where you want to use X.
This is useful if you think your account has been compromised, if you have used X on a shared computer, or if you have sold or given away a device and forgot to log out first. It is also a good practice to do this periodically if you use X on many devices.
The difference between logging out and other account actions
Logging out ends your session on one device. You remain the account owner, your data stays on X's servers, and you can log back in anytime with your password. X can still track you through web pixels and other methods.
Deactivating your account temporarily hides your profile, posts, and followers from public view. X keeps your data for 30 days in case you change your mind and reactivate. After 30 days, X deletes most of your information, though some data may be retained for legal or operational reasons.
Deleting your account is permanent. After a 30-day grace period, X removes your profile, posts, and followers list. However, X may keep some data like IP addresses and account history for longer periods, and any posts you shared with other users or that were retweeted may still exist in copies.
If you only want to step away temporarily without losing your account, logging out is the right choice. If you want to hide your activity from others but keep the option to return, deactivation works. If you want to remove yourself from X entirely, deletion is the path, though it is not instantaneous.
Why logging out matters for your privacy
When you stay logged in to X across multiple devices, X builds a more complete picture of your behavior. It knows which websites you visit, what you search for, what you click on, and when you are active. This data is used to target you with ads and to train X's recommendation algorithms.
Logging out does not prevent X from tracking you entirely, but it does limit the data X can directly attribute to your account in real time. If you log out and then visit a website with an X pixel, X still records the visit, but it may not when ready connect it to your account unless you log back in.
For people who share a device — a family computer, a work laptop, or a borrowed phone — logging out is essential. If you do not log out, the next person who uses that device can see your direct messages, your saved posts, and your browsing history within X. They could also post as you or change your account settings.
Checking if you are still logged in
If you are unsure whether you are logged out of X, the simplest check is to close the app or browser completely and then reopen it. If X asks you to log in again, you were logged out. If X opens directly to your home feed, you are still logged in.
On a computer, you can also check by opening X in a private or incognito window. If you can see your account without logging in, that means your browser has stored a cookie that keeps you logged in. Clearing your browser cookies will log you out, though this will also log you out of other websites.
In your account settings, you can also view "Your login history" to see the exact date and time of your last login on each device. If the timestamp is old, you may have been logged out automatically due to inactivity, though X does not always log you out after a set period.
What to do if you cannot log out
If the logout button is not working or you are stuck on a loading screen, try closing the app completely and reopening it. If you are on a computer, try a different browser or clear your browser cache and cookies, then log out again.
If you are locked out of your account or cannot access the logout option because you forgot your password, go to the X login page and select "Forgot password?". X will send you a link to reset your password. Once you reset it, you can log in and then log out normally.
If you believe your account has been hacked and you cannot log out, go to X's help center and report the issue. You can also change your password from the login page without being logged in, which will automatically log out all active sessions.
Frequently Asked Questions
Does logging out delete my posts or my account?
No. Logging out only ends your session on that device. Your posts, followers, likes, and account remain on X's servers. You can log back in anytime and everything will be there. To remove your posts or account, you would need to delete them separately.
If I log out, will X stop tracking me?
Logging out stops X from tracking your activity within the app, but X can still track you through web pixels on other websites if you are not logged in. To reduce tracking across the web, you can disable personalized ads in your privacy settings or use a browser extension that blocks tracking pixels.
Can someone else log into my account if I do not log out?
If you leave your device unattended while logged in, yes — anyone with physical access can see your messages, posts, and settings, and could post or change your account. Always log out on shared or public devices. If you are worried someone has accessed your account, change your password when ready, which will log out all sessions.
What is the difference between logging out and closing the app?
Closing the app does not log you out. When you reopen it, you will still be logged in. Logging out actually ends your session. On a phone, closing the app is like closing a door — you are still inside the house. Logging out is like leaving the house and locking the door.
How long does X keep me logged in if I do not use the app?
X does not have a set time limit for automatic logout due to inactivity. You may stay logged in for weeks or months without using the app. This is why it is important to manually log out on devices you no longer use or plan to sell.