How to move Google Authenticator codes to a new phone

Sync with your Google Account or scan the export QR code from the old phone directly with the new one, then check each account before you wipe the old phone.

To move Google Authenticator codes to a new phone, either sign in to the app with your Google Account so the codes sync, or use Transfer codes → Export codes on the old phone and scan the QR code it shows directly with the new phone. The export code holds your secret keys, so handle it like a password.

Two ways to move your codes

Sync with your Google Account

If you use Google Authenticator signed in to your Google Account, your codes are saved to that account. Install Google Authenticator on the new phone, sign in with the same account, and the codes appear. This is the simplest route if you’re comfortable keeping the codes in your Google Account.

Export and import with a QR code

If you use the app without a Google Account, or prefer not to sync, move the codes phone to phone:

  1. Install Google Authenticator on the new phone, and update it on the old phone.
  2. On the old phone, open the menu and choose Transfer codes, then Export codes. (Some versions say Transfer accounts and Export accounts.)
  3. Unlock the phone and choose the accounts to move.
  4. On the new phone, choose Transfer codes, then Import codes, and scan the code on the old phone’s screen.
  5. If the export is split into several QR codes, scan each one.

What’s in the export code

The export QR code holds a link that starts with otpauth-migration://offline?data=, followed by encoded data for each account you picked: the service name, the account name and the secret key that generates the six-digit codes.

Anyone who scans or photographs the code can make the same sign-in codes as you, for as long as those keys are in use. So:

  • Don’t screenshot it or share it. Screenshots can end up in photo backups and chat apps.
  • Scan it directly from the old phone’s screen with the new phone.
  • Export in private. Don’t show it on a shared screen, in a video call or near a camera.
  • Delete old copies. If you did take a screenshot or a photo, delete it, and empty the “recently deleted” folder too.

Before you wipe the old phone

  • Test the new phone. Sign in to a few accounts with codes from the new phone, or compare the codes on both phones: they should match.
  • Remove the accounts from the old phone once the new one works, then reset it.
  • Keep your backup codes. Most services give you a set of one-time backup codes when you turn on two-step sign-in. Store them offline, such as printed or in a password manager, so a lost phone doesn’t lock you out.
  • Check services that use other methods. Some accounts may use text messages or a hardware key rather than Authenticator; moving the app doesn’t move those.

The otpauth:// format, for reference

A single account’s setup code, the one a website shows when you turn on two-step sign-in, uses the Key Uri Format that Google documents:

otpauth://totp/Example:alice@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
  • totp means time-based codes (hotp is counter-based).
  • The label names the service and the account.
  • secret is the key, in Base32. This is the part to keep private.
  • Optional parameters set the algorithm (SHA1 by default), the number of digits (6 by default) and the period (30 seconds by default).

The export code bundles many such accounts into one otpauth-migration link.

Moving to a different authenticator app

Some authenticator apps can import Google Authenticator’s export code; others only read single otpauth:// codes. If your new app can’t read the export, you can set up each account again from the service’s own settings, which gives you a fresh setup code.

QR App for Android reads both kinds of code on the phone. For an otpauth:// code it shows the service, the account and the code settings, and Open in authenticator app hands the code to your authenticator app. For a Google Authenticator export it lists the accounts in it, and Show as QR code turns one account into a single otpauth:// code that you scan with your new authenticator app, one account at a time. Setup keys stay hidden until you tap Show. QR App has no internet access, and these codes aren’t saved to history, copied by themselves, or included in backups or exports.

Whichever app you use, scan export codes only from your own devices, and scan setup codes only from sites you trust. Be wary of a code you didn’t ask for that tells you to scan it into your authenticator app to “verify” an account; how to spot a fake QR code has more on tricks like this.

Questions and answers

Is it a problem to screenshot the export QR code?

The screenshot holds the secret keys for all the accounts in it, and screenshots can end up in cloud photo backups. Scan the code directly from the old phone's screen instead, and delete any screenshot you already took.

Why does the export show more than one QR code?

A single QR code can hold only so much data, so an export with many accounts is split across several codes. Scan each one in turn.

Do my old codes stop working after the transfer?

No. Exporting copies the keys, so both phones make the same codes until you remove the accounts from one of them. Remove them from the old phone once the new one works.

What if I lose the old phone before moving the codes?

Use the backup codes each service gave you when you turned on two-step sign-in, or the service's account recovery, then set up two-step sign-in again on the new phone.

Sources