otpauth URI Decoder
Runs in your browser. Nothing is sent to us. Is it safe?
An otpauth URI is the line of text hidden inside every 2FA QR code. This tool takes that link, breaks it into labelled fields so you can see exactly what it contains, and shows the live code straight away. You can save the account to the optional encrypted vault if you want to keep it. It is parsed in your browser and never uploaded.
What an otpauth URI is
When you set up two-factor authentication, the website encodes your setup as a link such as:
otpauth://totp/Example:alice@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example&algorithm=SHA1&digits=6&period=30
Authenticator apps read it, and your account appears. This decoder does the same reading but shows you the pieces, which is useful when a setup fails, when you are moving an account, or when you simply want to understand what you are scanning.
How to decode an otpauth link
- Get the link. Copy it from the website, or read a QR code with the QR code reader and choose to show the link.
- Paste it into the decoder. Include everything from
otpauth://to the end. The fields and the live code appear immediately. - Review the fields. Check the type, label, issuer, secret and any settings.
- Fix anything that looks wrong. Names can be edited before you save.
- Copy the code. Press the big Copy button and enter the code on the website to confirm. No account or passphrase is needed. Press "Save to my accounts" only if you want to keep it in the optional encrypted vault.
The parts of an otpauth link
| Part | Example | Meaning |
|---|---|---|
| Scheme | otpauth:// |
Says this is a one-time password setup link |
| Type | totp or hotp |
Time-based or counter-based codes |
| Label | Example:alice@example.com |
The issuer and account name, shown in your list |
secret |
JBSWY3DPEHPK3PXP |
The shared key, in Base32 (required) |
issuer |
Example |
The service name; should match the label prefix |
algorithm |
SHA1, SHA256, SHA512 |
The hash used; defaults to SHA1 |
digits |
6 or 8 |
Length of the code; defaults to 6 |
period |
30 |
TOTP lifetime in seconds; defaults to 30 |
counter |
0 |
HOTP only: the starting counter |
Two details trip people up. The label is URL-encoded, so a space appears as %20 and an at sign may appear as %40; the decoder shows the readable version. And parameters can come in any order, so do not assume secret is first.
Why decode a link instead of scanning it
- Debugging a setup. A service says "invalid code". Decoding shows whether it asked for 8 digits, a 60-second period or SHA-256 that you did not set.
- Moving between apps. Seeing the secret and settings lets you add the account to a different authenticator exactly.
- Checking a link before you trust it. If a link claims to be from one service and the issuer says another, you have found a red flag.
- Learning and development. Developers can inspect what their server generates and compare it with the specification.
A worked example
Take the example link above. The type is totp, so the codes are time-based. The label says the issuer is Example and the account is alice@example.com. The secret is JBSWY3DPEHPK3PXP. The algorithm is SHA1, the code has 6 digits and it lasts 30 seconds. Those are also the defaults, so a link carrying only a secret would behave exactly the same way.
Handling the link safely
An otpauth link contains your secret in plain text. Anyone who sees the full link can produce your codes. So:
- Do not paste it into chats, emails or documents.
- Do not post screenshots that show it, even partly.
- Clear your clipboard after you copy it, or copy something else.
- Prefer to decode it only on a device and browser you control.
Limits of this tool
The decoder reads single-account links of the types totp and hotp. It does not generate links or QR codes. Bulk export links such as otpauth-migration:// are a separate format. {{migration_qr_support}}
Privacy
Parsing happens in your browser. In instant mode the secret stays in page memory only and is wiped when you press Clear or leave the page. Accounts that you choose to save are encrypted with your passphrase (PBKDF2-SHA256 and AES-GCM-256) and kept only on your device. Nothing is sent to our server. This page has no ads and no analytics. See Is it safe? for the complete explanation and a step-by-step way to verify it yourself.
Related tools
- QR code reader if the link is still a picture.
- TOTP generator and HOTP generator to enter a secret by hand.
- How to enable 2FA for guides to popular services.
Frequently asked questions
What is an otpauth URI?
It is a text link that carries everything an authenticator needs to set up an account: the type (TOTP or HOTP), the account label, the secret key and optional settings. QR codes for 2FA are just this link drawn as a picture.
What does an otpauth URI look like?
For example: otpauth://totp/Example:alice@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example&algorithm=SHA1&digits=6&period=30. The part after the second slash is the label, and the part after the question mark is a list of parameters.
Which parameters are required?
Only the secret. Everything else has a default: SHA1 for the algorithm, 6 digits, and a 30-second period for TOTP. HOTP also needs a counter.
Where do I get an otpauth link?
Some services show it as a link or text under the QR code. You can also get it by reading a QR code, which our QR code reader does for you.
Why do the issuer in the label and the issuer parameter sometimes differ?
The label can carry an issuer prefix (Example:alice) and the query can carry issuer=Example. They should match. When they do not, the parameter is generally considered the more reliable one, and you can edit the name before saving.
Is it safe to paste an otpauth link here?
The link is parsed in your browser and is not sent to our server. It does contain your secret, so treat it like a password. Check the network panel yourself, as described on our safety page.
Can I turn a secret into an otpauth link?
Not with this tool, which reads links rather than building them. If you only have a secret, use the TOTP generator and enter it with its settings.
Why does my link start with otpauth-migration://?
That is a different format that some apps use to export many accounts at once. It is not a single-account otpauth link. {{migration_qr_support}}
Save accounts in an encrypted vault (optional)
Want your codes kept on this device? Create a vault protected by your passphrase. Skip it if you only need a code right now.