You can't retrieve your Android screen-lock PIN as readable text—not from Settings, not with a hidden menu, and not through Google's tools. The PIN is stored as a cryptographic hash inside the phone's secure hardware. What you can do depends on whether the phone is unlocked or locked, and on the manufacturer. If you're still signed in, you can change the PIN; if you're locked out, you'll either use a manufacturer-specific recovery path or fall back to a factory reset that erases the data.
That's the blunt answer, and it's worth stating up front because most search results pretend otherwise. For clarity, "PIN" here means the screen-lock PIN in Settings under Screen lock. A SIM PIN is a separate credential handled in the next section. Google's own support documentation for locked devices leads with a warning that its recovery options erase everything stored on the phone, which tells you the direction this usually goes.
Three Different "PINs" Get Confused, and Only One Is Retrievable
Before touching any menu, identify which PIN you actually forgot. The right procedure differs completely depending on the credential.
| Credential | What it protects | Stored where | Can Android display it? |
|---|---|---|---|
| Screen-lock PIN | The whole phone | Hashed in secure hardware | No—never shown in plain text |
| SIM PIN | The physical SIM or eSIM | On the SIM and in carrier systems | No, but the carrier can supply it or a PUK |
| App, banking, or vault PIN | A single app's data | The app's own sandbox or server | Sometimes, through that app's account recovery |
The screen-lock PIN is the one people mean when they ask this question, and it's the one with the fewest recovery options. Confirm whether your phone actually has one by checking the lock screen prompt: four to six digits means a PIN, while a pattern of dots means a swipe pattern, which is a different credential with different reset behavior.
If You Can Still Unlock the Phone, Change the PIN
This is the only scenario where you end up with a PIN you know for certain, because you overwrite the old one rather than recovering it. Note that Android requires you to enter the current PIN or a previously registered fingerprint to make the change, so this only works while you still have access.
1: Open Settings. 2: Tap Security & privacy (the label may read Biometrics & security, Lock screen, or similar depending on brand and Android version). 3: Tap Screen lock or Device unlock. 4: Confirm your existing PIN, pattern, password, or fingerprint. 5: Tap PIN (or Change screen lock), then enter and confirm the new digits. 6: Lock the screen once and unlock it with the new PIN to prove it took.
You'll know it worked when the lock screen accepts the new digits immediately after a restart. If the screen stays locked after the change, something failed silently—try again before rebooting further, because a restart on a half-configured lock can leave you worse off.
If you've forgotten the current PIN but your fingerprint or face still unlocks the phone, some Android versions let you change the PIN by authenticating with biometrics alone. This is inconsistent across manufacturers and Android releases, so don't count on it—try it before assuming you're locked out.
Recover Recently Changed Samsung Lock Credentials
Samsung is the one mainstream manufacturer with a documented path to restore a previous lock credential, called "previous lock" backup, and it works only under specific conditions: the phone must be connected to Wi-Fi or mobile data, signed into the same Samsung account, and have Remote unlock enabled beforehand. If all of that holds, you may be able to restore the PIN that was set before the most recent one.
The steps, in order:
1: On the lock screen, enter anything incorrect a few times (for example, zero, zero, zero, zero). 2: After several failed attempts, the screen offers a Forgot PIN option. Tap it. 3: Sign in to your Samsung account when prompted. 4: Choose the option to restore the previous lock method or the option to unlock remotely. 5: Enter the older PIN you remember.
This won't work if the phone was set up without a Samsung account, if remote unlock was never turned on, or if any lock change happened after the last sync. If you don't see a Forgot PIN option, or signing in fails, that's your stop signal—the backup doesn't exist. Don't keep guessing, because Samsung phones enforce increasing lockout delays after repeated failures, and on some models a factory reset erases the phone once you exhaust the attempts.
Use Google Find My Device as a Reset, Not a Recovery
Find My Device can lock, ring, or erase a phone signed into the same Google account, and the erase action removes the screen-lock PIN along with everything else. Treat it as a reset path for when you've accepted data loss—Google's own page warns that these options delete stored data and only restores what you'd backed up to your account.
The sequence, if you've decided to proceed:
1: On another device, sign in to the Find My Device service in a browser with the same Google account. 2: Select the locked phone from the device list. 3: Choose Erase device. If it's offered, choose Secure device instead and check whether your model allows setting a new lock without erasing—support here varies by manufacturer and Android version. 4: Confirm, then wait for the phone to come online and wipe itself. 5: Set the phone up again and restore from your Google backup.
Don't reach for Find My Device expecting to see an old PIN. Nothing in the interface surfaces it, which is the entire point of how Android stores it—a credential that could be displayed would be a credential an attacker could display too.
Use Google Account Recovery When the PIN Gates the Google Prompt
There's a stranger edge case worth knowing. On some phones, the lock screen shows an email account you're signed into. Tapping Forgot PIN and then entering the email password lets you reset the lock—but only if the device's protection level allows it. Carry this out only on your own device: it changes the lock on the phone whose Google account you just authenticated, and if the phone belongs to someone else, the change lands on their device.
1: Tap Forgot PIN on the lock screen. 2: Enter the password of the Google account displayed. 3: Follow the on-screen prompt to choose a new screen lock.
The password is often the same eighteen-character-ish password you invented for that account. If you've forgotten it, use the account recovery flow on the Google sign-in page rather than guessing at the phone, where lockouts are unforgiving.
For a Completely Locked Phone, Reset Through Recovery Mode
When nothing else applies, a hardware factory reset clears the screen lock, because Android's lock data is stored in the user-data area that a factory reset wipes. The method is version-specific, so the following is the general shape rather than exact key combinations for your model.
1: Power the phone off. If it won't, hold Power for about ten seconds until it restarts and immediately release. 2: Hold the buttons used for recovery on your model—commonly Power plus Volume Down, or Power plus Volume Up on some Samsung phones. 3: On the boot menu, use the volume keys to highlight Recovery mode and press Power to select. 4: Choose Wipe data/factory reset, then confirm. Choose the option that deletes data, not one that reformats the cache partition. 5: Select Reboot system now and wait for the phone to start. It will ask you to sign in with the Google or Samsung account that was on the device—this is the FRP (factory reset protection) lock, a separate check from the PIN.
If the phone boots to a "This device was reset" screen demanding an account you don't have credentials for, stop here. That's a genuine stop condition: no legitimate method gets past FRP without the previous owner's account, and attempts to bypass it are exactly what it exists to defeat. If you bought the phone used and the seller still has the account, they need to sign in on the device—the fix is theirs, not a service technician's workaround.
The Erasure Trap and the Checks That Prevent It
The most expensive mistake with this question is destructive troubleshooting in the wrong order—resetting when a two-minute Samsung recovery or a biometric change would have worked. Here's a quick triage:
Phone unlocks with a fingerprint or face? Try changing the PIN through Settings first. Samsung, recent lock change, connected, account signed in? Try Forgot PIN / previous lock before anything else. Is the phone backed up? Check Google Photos and Drive settings from a browser to see whether current photos and documents are synced. If not, a reset destroys them. Is the phone rooted or running a custom recovery? Even then, the PIN sits in encrypted storage bound to the hardware keystore. Removing it requires wiping that storage, and on devices using file-based encryption that means deleting the decryption keys along with the PIN—so yes, genuinely gone.
The arithmetic of the situation is simple: recovery without erasure depends on a backup that was created before the emergency. If no backup exists and the lock won't yield, the phone's data is the price of the reset. Factor that in before tapping anything that says "erase."
SIM PINs Are a Separate, Easier Problem
If the PIN you actually forgot is the one Android asks for at boot with a SIM-card icon, the procedure and prospects change. Android typically can't display it, because it lives on the SIM and in carrier systems rather than in a readable setting. What you can do:
1: Look for the original SIM carrier card—most have the PIN printed on a plastic frame. 2: Check your carrier's website or app; many let you view or change the SIM PIN after account login. 3: If the SIM is locked and demanding a PUK, stop guessing. Entering the PUK wrong repeatedly can permanently disable the SIM, and only your carrier can supply it.
Devices with eSIMs complicate this further, since there's no physical card to consult and the profile is managed by the carrier—account access is your only route. And note that disabling SIM lock in Settings and re-enabling it, which some guides suggest as a way to reset the PIN, requires knowing the current PIN first, so it doesn't help a forgotten one.
Where "Retrieve" Behavior Varies by Brand and Android Version
Manufacturer skins diverge enough that a specific path may not exist on your phone. Samsung routes lock settings through Biometrics & security and supports remote unlock. Pixel devices lean on Google's Find My Device with fewer local recovery hooks; on some generations, choosing a screen lock also sets up "lock screen PIN you'll remember" reminders. Xiaomi, Oppo, and other brands often provide cloud-account-based unlock on their own portals, with requirement sets that change between MIUI/HyperOS and ColorOS releases.
The practical rule: check your manufacturer's official support page for your exact model and software version before the factory reset, because a cloud unlock might be available where you didn't expect one. Version numbers matter here—steps written for Android 12 can fail silently on Android 15/16 interfaces—and any specific instruction you find online should state the version it targets. If it doesn't, verify each screen yourself as you navigate, rather than trusting the sequence blindly.
What Doesn't Work, Despite Appearing Everywhere
Some methods recur in search results and forums even though they don't function on modern, non-rooted phones. Saving you the hours:
Hidden Settings menus. No combination of dial codes or developer options displays the current screen-lock PIN. It isn't rendered anywhere, so there's nothing to find. Third-party "PIN recovery" apps on the Play Store. An Android app runs as a normal process with no privilege to read other apps' secure storage, let alone the keystore. Apps advertising PIN uncovering are either scams, ad vehicles, or forward to a factory reset you could do yourself for free. Find My Device showing the old code. It can ring, lock, and erase—not reveal. Removing the lock file via USB and a PC. Modern devices enforce encryption tied to the lock credential; deleting the lock file means deleting the decryption key, so the data inventory is lost even if the lock screen disappears.
If a tool promises to preserve your files and show the PIN on a stock, unrooted phone, that claim contradicts how Android security works. Treat it as false.
A Sensible Order to Try, Summarized
The workable sequence, for your own device, is: change the PIN while you can still unlock → try Samsung's previous-lock recovery if applicable → use Google Find My Device erase only after confirming your backups → recover the account through Google if the lock screen offers it → last, factory reset in recovery mode. At every step before the final one, decide whether the data on the phone is worth preserving past your next failed attempt, because the recovery options narrow toward erasure.
And if the phone isn't yours, stop at the start. The account sign-in checks that frustrate you on someone else's device are the same ones protecting your own phone from exactly this procedure.