Google Authenticator Export Decoder (otpauth-migration) – Free

This Google Authenticator export decoder reads the otpauth-migration URL behind a transfer QR code and lists the accounts it contains: name, issuer and whether each is TOTP or HOTP. Decoding is local.

How to use the Authenticator export decoder tool

  1. In Google Authenticator, choose Transfer accounts, then Export accounts, and scan the QR code with a QR reader that shows the raw text.
  2. Paste the text, which begins with otpauth-migration://offline?data=, into the otpauth-migration URL box.
  3. Select Inspect export to decode the payload.
  4. Read the JSON list in the Result box. Each entry has a name, an issuer and a type.
  5. Select Copy if you want to keep the inventory, then Clear to remove the URL from the page.

How a Google Authenticator export is encoded

When you export accounts, the app does not show ordinary otpauth:// links. It packs all selected accounts into one binary message, encodes it as Base64 and puts it in the data parameter of an otpauth-migration://offline URL. That URL is what the QR code contains.

The binary message uses the Protocol Buffers wire format. Each field starts with a tag that combines a field number with a wire type, followed by either a variable-length integer or a length-prefixed block of bytes. In the export, field 1 of the outer message repeats once per account. Inside an account, field 1 is the secret key, 2 the account name, 3 the issuer and 6 the type, where 1 means HOTP and 2 means TOTP.

This decoder walks those fields directly and prints fields 2, 3 and 6 of each account. It discards the rest, including the secret.

Example export and decoded result

The URL below is a made-up export with two accounts and dummy keys. The first is time-based with an issuer, the second counter-based without one.

otpauth-migration://offline?data=Ci4KCkhlbGxvId6tvu8SEWFsaWNlQGV4YW1wbGUuY29tGgdFeGFtcGxlIAEoATACCiQKCgECAwQFBgcICQoSDGJ1aWxkLXNlcnZlchoAIAEoATABOAUQARgBIAAowMQH

[
  {
    "name": "alice@example.com",
    "issuer": "Example",
    "type": "TOTP"
  },
  {
    "name": "build-server",
    "issuer": "",
    "type": "HOTP"
  }
]

What the Google Authenticator export decoder shows

The result is an inventory. It is useful for checking which accounts an export covers before you wipe a phone. Secret keys, the hash algorithm, the digit count and HOTP counters are present in the data but are not printed, so the output cannot be used to recreate the codes.

Large exports are split across several QR codes. Each code holds its own URL, so decode them one at a time. The input may be up to 300,000 characters. The tool accepts text only and does not read a QR image.

Why an otpauth-migration URL fails to decode

These are the conditions in the code that stop a decode, with the usual real-world cause of each.

  • The text is a regular otpauth://totp link or has no data parameter. Only the migration format is accepted.
  • The Base64 was altered. A literal plus sign in a URL is read as a space, so the data must stay percent-encoded (%2B, %2F, %3D).
  • The URL was cut off while copying, which leaves a field that claims more bytes than remain.
  • The payload has a wire type other than varint or length-delimited, or an integer longer than five bytes, which is how Protocol Buffers stores a negative 32-bit value.
  • The message decodes but holds no account entries.

Frequently asked questions

Is it safe to paste my Google Authenticator export here?

The URL is decoded by JavaScript in your browser and is not sent anywhere. Still, it contains the secret keys for all exported accounts, so treat it like a set of passwords: avoid shared computers and clear the form afterward.

Does this tool show my TOTP secret keys?

No. It prints only the account name, issuer and OTP type. The secret bytes are skipped, so the result can be shared as an account list without revealing anything that generates codes.

How do I get the otpauth-migration URL from the QR code?

Scan the export QR code with a general QR scanner or a camera app that displays the decoded text without opening it. The text starts with otpauth-migration://offline?data=. Copy the whole string.

What is the difference between TOTP and HOTP in the result?

TOTP codes are derived from the current time, usually in 30-second steps, as defined in RFC 6238. HOTP codes are derived from a counter that advances with each use, as defined in RFC 4226.

Why does the type say Unknown?

The type field of that account was missing or held a value other than 1 or 2. The entry is still listed with its name and issuer.

Related tools