How Do You Prepare Backup Codes for a Trip Without Leaving Them in Plain Text?
Backup codes are the last way back into an account when your phone is gone. This guide shows how to prepare them before a trip, store them without plain text, and test the plan.
11 min readUpdated Nov 19, 2026By XPASS Editorial Team

Backup codes are the quiet part of two-factor authentication. When your phone is lost, the authenticator app is gone or the SIM will not receive a text, a short list of one-time codes is often the only thing between you and a locked account. Most people save them once, if at all, usually as a screenshot or a note called "codes" that sits in plain text on the same phone they are trying to protect against losing.
This guide is about preparing those codes before a trip in a way that is both usable and sensible: where to get them, how to store them without leaving a readable file lying around, how to carry them, and how to check that the plan works before you board. If you want the wider picture first, read our guide to two-factor authentication while travelling.
What backup codes are and why they matter on a trip
When you switch on two-factor authentication, many services offer a set of backup codes. They are usually a handful of short strings, often eight to ten, and each one is meant to be used once. You type one in place of the normal code when the usual method is unavailable. The exact format, the number of codes and the rules differ by service, so treat everything here as a general picture and read what your own account says.
Why do they matter more abroad? Because the usual second factor is more likely to fail. A SIM may be switched off or out of coverage, an authenticator app lives on a phone that can be dropped, stolen or left in a taxi, and a new phone does not carry your apps automatically. If you have not prepared a way back, the recovery process can take days and may involve proving your identity with documents. A backup code, used once, can end the problem in a minute.
It also helps to understand what a backup code is not. It is not a password reset, and it does not prove anything beyond "the person typing this was given the list". That is exactly why it must be treated like a spare key to the account: valuable to you, and just as valuable to anyone who finds it.

Why plain text is the weak spot
The common ways people save codes are convenient and unsafe at the same time.
- A screenshot or photo. It goes into the gallery, which may sync to a cloud photo service, appear in a device backup or be visible to anyone you hand the phone to for a photo. If the phone is lost, the screenshot is lost with it.
- A note in a notes app with no protection. Many notes apps store text readable by anyone who unlocks the phone, and some sync across devices and the web.
- An email to yourself. The email account is often the very account that backup codes are meant to rescue. If it is the thing you are locked out of, the codes are locked out with it, and old messages can sit in several places.
- A text file on the desktop or in a shared cloud folder. Easy to find, easy to copy, easy to read by someone who gets into that folder.
- A chat to yourself or a friend. Chat histories are long-lived and often synced across devices.
None of these is a disaster for every person. The point is that the codes are only worth having if they survive the exact situations you are preparing for, and a copy that disappears with the phone, or can be read by whoever finds it, fails one test or the other.
Step one: generate fresh codes and check what the old ones do
Do this at home, on a trusted network, at least a few days before you leave, not at the airport.
- List the accounts that matter. Email, the account that holds your password manager, your Apple or Google account, your main bank or payment apps, work accounts and social accounts you cannot afford to lose. Start with email: it is usually the recovery route for the rest.
- Open the security settings of each one and look for "backup codes", "recovery codes" or "verification codes". Some services only offer them after you have turned on a particular second factor.
- Generate a new set if the service allows it. Many services invalidate the previous list when you create a new one. Read the message on screen and, if in doubt, assume the old list stops working so you do not keep two versions.
- Note the date and the account next to each list so you know which set belongs where.
- Do not write them into the account itself. Keep them out of anything that account protects.
Some services do not offer backup codes at all. They use other recovery steps such as a trusted device, a recovery email, a recovery phone number, a passkey or a hardware key. For those, the equivalent job is to make sure each of those routes is set up and reachable. Our guide on passkeys explains why a passkey on a second device can be a useful fallback.
Step two: choose how to store them without plain text
There is no single correct choice. The right approach is usually a combination of two methods kept in different places, so that losing the phone does not also lose the codes, and finding one copy does not hand over everything.
| Method | Works with no phone | Readable if someone finds it | Main weakness |
|---|---|---|---|
| Paper sheet in your luggage | Yes | Yes, if you write codes in full | Lost with the bag, seen by others |
| Paper with codes lightly altered by a personal rule | Yes | Not directly | You must remember the rule exactly |
| Password manager secure note | Only if you can open the manager | No, it is encrypted | You need the master password and a recovery path |
| Encrypted file or archive on a USB stick | Yes, with a computer | No, without the passphrase | Needs a device to read it, passphrase can be forgotten |
| Trusted person holds a copy | Yes | Depends on their care | Trust and communication |
Paper, but not naive paper
Paper has one big advantage: it works when every device you own is dead or missing. Its disadvantage is that a plain sheet reads like a key. Some options that keep the benefit while reducing the risk:
- Write only the codes you need, not the account password and not a note that says what they unlock in plain words. A short label such as "mail A" that only you understand is enough.
- Keep the account names on a separate line, or in a different place, from the codes themselves.
- Fold or seal the paper and keep it somewhere that is not the first thing a bag search finds, such as inside a travel document pouch you already treat carefully.
- Consider applying a simple personal rule to the written codes, for example leaving out the last character or swapping two positions in a way only you remember. This is only a mild deterrent, it is easy to get wrong, and it is a poor idea if you may be tired or stressed when you need it. If you use it, test it at home.
A password manager
A password manager encrypts what you store with a key derived from your master password. Putting each list into a secure note, with the account name as the title, keeps it out of your gallery and out of your notes app, and it can sync to a second device. Two cautions apply.
First, you must be able to open the manager when the phone is gone. That means knowing the master password by heart, having the manager installed on a laptop or a spare device, or holding the manager's own emergency recovery material somewhere safe. Second, if the manager itself needs a second factor, do not make its only fallback a code stored inside the manager. That is a loop with no way in. For more on how a manager and a VPN fit together, see VPNs and password managers.
An encrypted file or archive
If you prefer files, create a small archive with strong encryption using a tool you already trust, protect it with a long passphrase, and keep the archive on a USB stick or in a separate cloud account. Do not store the passphrase next to it. The passphrase needs to be something you can reproduce from memory under pressure, ideally a long phrase rather than a short complicated string. Test opening the archive on a different computer before you leave.
A trusted person
A relative or close friend can hold a sealed copy, or a paper that tells them where yours is. This is practical for long trips. Decide in advance what they may do with it and what they must never do, for example reading a code aloud on the phone to someone who claims to be your bank. If you share anything, keep the amount minimal.
Step three: carry them sensibly
A good storage plan can still fail in transit. Think about the moment of recovery: you are somewhere unfamiliar, you do not have your phone, and you need a code.
- Split the copies. One in your carry-on or day bag, one in a different place such as the hotel safe, a checked bag or with a trusted person. If one bag is lost or stolen, you still have the other.
- Keep them away from the phone. If the phone and the codes are in the same pocket, a single loss removes both factors. The whole point of a backup is that it does not share a failure with the original.
- Do not photograph them "just in case". A hotel safe, a sealed envelope and a password manager all do the job without leaving a readable image in the gallery.
- Leave a record at home. A trusted person, or a sealed envelope at your house, can be the third copy in case both travelling copies fail.
- Think about border and hotel handling. Paper can be handled, searched or misplaced. Keep the sheet short and unlabelled enough that it does not teach a stranger anything.
Step four: test the plan before you leave
An untested backup is a hope, not a plan. A short rehearsal at home can save a day abroad.
- Pick one low-risk account and sign out of it on a spare device or in a private window.
- Sign in again using a backup code from your stored copy, as if your phone were unavailable. Notice how the account behaves and what it says.
- Check that the used code no longer works and that you know how many are left. If a service lets you generate a new list, do it after the test and update your stored copy.
- Confirm you can read your storage without the phone. Open the password manager from a laptop, decrypt the archive on another computer, or read the paper by torchlight.
- Write a one-line recovery order for yourself: first the email account, then the password manager, then the bank. It saves thinking when you are tired.
If a test fails, fix it now. Many services also send an alert when a backup code is used, which is a good way to notice if someone else ever tries.

A plain example
Mina is travelling for three weeks with her phone and a small laptop. At home she opens the security settings for her email, her cloud account and her payment app. She generates a fresh set of backup codes for each one, since each service says the old list will stop working.
She puts each list into a secure note in her password manager, titled with the service name, and she writes the master password only in her head. She also copies the email codes onto a small folded paper marked only with "M1", kept in the zip pocket of her laptop bag, away from her phone. Her sister at home holds a sealed envelope with the cloud account codes.
Before she leaves, she tests: she signs out of the cloud account on the laptop, signs in using one code from the password manager, and confirms the code is then used up. She generates a new list, replaces the stored copy and moves on. During the trip her phone is stolen in a market. She reports it, uses the find-my-phone feature from the laptop, signs in to her email using a paper code and then unlocks the password manager from the laptop. She is back in her accounts within an hour and uses the lost phone checklist to handle the rest.
Limits and what a VPN does not do
It is tempting to think a VPN handles all of this. It does not.
- A VPN does not encrypt your stored codes. It protects traffic between your device and the VPN provider while it is connected, which can help on shared Wi-Fi. A text file on your phone is as readable as before.
- A VPN does not stop social engineering. If someone phones you pretending to be your bank and asks you to read out a code, no VPN will intervene. Backup codes and one-time codes are for you to type into the official site or app only.
- A VPN is not a recovery method. It does not prove who you are to a service and does not unlock an account. In some cases a new location or a VPN connection can lead a service to ask for extra verification, which is why having working backup codes matters. For related background, see our article on account locks after logging in from abroad.
- A backup code can still be misused if found. Anyone who has the code and your password can use it. Physical security of the list is your job.
- Services differ. Some do not issue backup codes. Some never expire them, others reset them on a schedule. Read the instructions on each account and confirm the current behaviour before you rely on it.
A VPN can still be a sensible habit when you sign in on hotel or airport Wi-Fi, because the connection to the VPN is encrypted. Use it for that purpose and keep your expectations realistic.
Common mistakes to avoid
- Generating codes once, years ago, and never checking. The list may have been replaced or used up.
- Keeping the only copy in the phone. A backup that vanishes with the phone is not a backup.
- Saving the codes into the account they protect. If that account is the one you are locked out of, you cannot read them.
- Storing the password manager's recovery key inside the password manager. This is another loop with no way in.
- Sharing a code by chat or voice. A code read out to anyone is a code spent, and the person asking is very likely a scammer.
- Leaving it to the airport. Doing it at the last minute leads to missed steps and shared networks.
- Forgetting to update after use. If you used a code, mark it off or generate a new list so your stored copy matches reality.
Summary
Backup codes are your spare key. Generate fresh ones at home, a few days before you travel; store them in two different places that do not rely on the phone, using paper, a password manager or an encrypted file instead of a screenshot or a plain note; carry the copies separately; and test one sign-in so you know it works. A VPN is useful on shared Wi-Fi, but it neither protects your codes nor replaces them. If you want a simple way to protect your connection on hotel or airport networks during the trip, you can look at the options on the XPASS pricing page.
Frequently asked questions
What are backup codes and when do I use them?
Backup codes are a short list of one-time codes that a service gives you when you switch on two-factor authentication. You type one in place of the normal code when your phone, authenticator app or SIM is unavailable. Each code usually works only once.
Is it safe to take a screenshot or photo of my backup codes?
It is risky. A screenshot lands in your photo gallery, which may sync to a cloud account, appear in a backup or be seen by anyone who borrows your phone. If the phone is the thing you are afraid of losing, a copy on that phone does not help.
Should I store backup codes in my password manager?
It is a reasonable choice for many people, as long as you can still open the password manager when your phone is gone. Know your master password, keep a recovery path for the manager itself, and avoid making the manager depend on the same phone as everything else.
How many sets of backup codes should I carry?
One current set per important account, kept in two separate places, is usually enough. Many services replace the old list when you generate a new one, so do not keep several different versions and mix them up.
Does a VPN protect my backup codes?
A VPN encrypts the connection between your device and the VPN provider, which helps on shared Wi-Fi. It does not encrypt a file on your phone, protect a paper sheet or stop you from being tricked into sharing a code.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a VPN for a short trip or a busy month?
XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.
See passesKeep reading

VPN Security
Two-Factor Authentication While Travelling
How to keep two-factor authentication working abroad: the strengths and weak points of each method, keeping your Thai number reachable for bank OTP, backup codes, SIM-swap risk and the real role of a VPN.
11 min read

VPN Security
Lost Your Phone Abroad? What to Do First
A lost or stolen phone abroad can expose your bank, e-wallet, LINE and email at once. Here is a prioritised checklist, from locking the phone to setting up a new one, plus how to prepare before you travel.
10 min read

Privacy Guides
VPN vs Password Manager: Why You May Need Both
A VPN and a password manager solve different problems. This guide shows which threat each tool handles, how they work together, and what order to set them up in.
9 min read