Why and when to change your passcode
A passcode is the password you use to unlock your device when you turn it on or wake it from sleep. Changing it regularly — or right after someone else has used your device — keeps your files and accounts safer. If you share a computer with family members or coworkers, a new passcode means only you can access your files without asking for permission each time.
You should change your passcode if you think someone knows it, if you have not changed it in over a year, or if you are selling or giving away the device. The process takes about five minutes and works the same way whether you use Windows, Mac, iPhone, or Android.
Key Takeaways
- On Windows, go to Settings > Accounts > Sign-in options and choose "Password" to create a new one.
- On Mac, open System Settings > General > Login Items & Extensions, then click your user account and select "Change Password".
- On iPhone, go to Settings > Face ID & Passcode (or Touch ID & Passcode), enter your current passcode, then tap "Change Passcode".
- On Android, open Settings > Security & Privacy > Screen lock, select your current lock type, and follow the prompts to set a new one.
- Write your new passcode down in a safe place, or use a password manager to store it so you do not forget it.
Changing your passcode on Windows 10 and 11
Open the Start menu and type "Settings" into the search box, then click the Settings app. Once it opens, click "Accounts" on the left side of the window.
Click "Sign-in options" in the left menu. Under the "Password" section, you will see a button that says "Change". Click it. Windows will ask you to enter your current password to confirm you are the account owner — type it in and click "Next".
Now you will see two blank fields: one for your new password and one to confirm it. Type your new passcode into both fields. Make it at least eight characters long and include a mix of uppercase letters, lowercase letters, numbers, and symbols (like ! or @) so it is harder to guess. Click "Next", then "Finish". Your new passcode takes effect the next time you restart your computer or sign out and back in.
Changing your passcode on Mac
Click the Apple menu in the top-left corner of your screen and select "System Settings". In the left sidebar, click "General". Scroll down and click "Login Items & Extensions".
At the top of the window, you will see your user account name. Click on it. A new window will open with account details. Look for the button that says "Change Password" and click it. Mac will ask you to enter your current password first — type it in and click the arrow button to continue.
You will now see two fields for your new passcode. Type the same passcode into both fields to confirm it matches. Use at least eight characters and mix uppercase and lowercase letters with numbers or symbols. Click "Change Password" when you are done. The change takes effect when ready, and you will use the new passcode the next time you lock or restart your Mac.
Changing your passcode on iPhone
Open the Settings app and scroll down to find "Face ID & Passcode" or "Touch ID & Passcode" — the name depends on which model of iPhone you have. Tap it. At the top of the screen, you will see a field that says "Enter Passcode". Type in your current passcode and tap "Change Passcode".
The phone will ask you to enter your new passcode twice to make sure you typed it correctly. iPhone passcodes are usually six digits long by default, but you can make yours longer by including letters and symbols if you want extra security. After you enter it the second time, tap "Done". Your new passcode is active right away.
If you forget your new passcode, you will have to erase your iPhone and set it up again from a backup, so write it down or save it in a password manager before you close Settings.
Changing your passcode on Android
Open the Settings app and scroll down to find "Security & Privacy" or "Lock screen" — the exact name varies by phone brand. Tap it. Look for "Screen lock" or "Lock type" and tap that option.
Android will ask you to enter your current passcode, pattern, or fingerprint to confirm you own the phone. Do that. Then select what type of lock you want to use: PIN (numbers only), Password (letters, numbers, and symbols), Pattern (drawing a shape on the screen), or Biometric (fingerprint or face recognition). If you choose PIN or Password, type your new code twice to confirm it. Tap "Confirm" or "Done" when finished.
Your new lock takes effect when ready. The next time your screen turns off, you will need to use the new passcode to unlock it.
What to do if you forget your new passcode
If you change your passcode and then forget it before you write it down, your options depend on which device you use. On Windows, you can use a password reset disk if you created one before you forgot the passcode, or you can use another administrator account on the same computer to reset it. On Mac, you can use your Apple ID to reset it, but you will need to know that password instead.
On iPhone and Android, forgetting your passcode is more serious. You cannot unlock the phone without it, and there is no built-in way to recover it. Your only option is to erase the phone completely and set it up again from a backup if you have one. This is why writing down your new passcode or storing it in a password manager before you close Settings is so important.
Using a password manager to store your passcode safely
A password manager is a program that stores all your passwords in one encrypted vault so you do not have to remember them. Popular options include Bitwarden (free), 1Password, and LastPass. Once you set up a password manager with a strong master password, you can store your device passcode there along with passwords for email, banking, and other accounts.
The advantage is that you only have to remember one strong master password, and the manager fills in the rest. If you lose your device or need to recover your passcode, you can look it up in the manager on another device. Make sure you choose a master password that is long and unique, and never share it with anyone.
Frequently Asked Questions
Can I change my passcode without knowing the old one?
No. Every device requires you to enter your current passcode before you can set a new one. This is a security feature to prevent someone else from changing your passcode without permission. If you have forgotten your current passcode, you will need to use a recovery method like a password reset disk (Windows), your Apple ID (Mac), or erase and restore the device (iPhone and Android).
How often should I change my passcode?
Security experts recommend changing your passcode at least once a year, or sooner if you think someone knows it. If you share your device with other people, change it whenever someone stops using it regularly. You do not need to change it more than once a year unless you have a specific reason to worry about security.
What makes a strong passcode?
A strong passcode is at least eight characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid using your name, birthday, or common words that appear in the dictionary. The harder it is to guess, the better — a random mix of characters is stronger than a word with a number at the end.
Will changing my passcode affect my files or programs?
No. Changing your device passcode only changes how you unlock your device. Your files, programs, and settings stay exactly the same. You will not lose anything, and programs will continue to work normally. The only difference is that you will use your new passcode the next time you lock or restart your device.
Can I use the same passcode on all my devices?
You can, but it is not recommended. If someone learns that one passcode, they can unlock all your devices. It is safer to use a different passcode on each device — your computer, phone, and tablet. A password manager makes this easier because it stores all of them for you.