TOTP otpauth URI Builder
Builds an otpauth://totp/ URI with issuer, account, base32 secret, digits and period for QR code apps.
—
Getting the otpauth provisioning URI right
You finished the TOTP work on the server, generated the base32 secret, and now you have to hand it to the user's app. Authenticator apps do not accept a bare secret: they expect a string shaped like otpauth://totp/, with an account label and parameters in the query. Forget the issuer or leave the email unescaped and the app either imports the account under the wrong name or refuses it without saying why.
The label is built as issuer:account, with each half percent-encoded on its own, and the issuer shows up a second time as a query parameter. That repetition is deliberate: older clients read the label prefix, newer ones read the parameter, and Google's key URI format recommends sending both. The secret is only checked against the base32 alphabet (A-Z, 2-7 and =), with spaces stripped and everything upper-cased. No length or checksum validation happens.
The page hands back the URI text, it does not draw a QR code, so copy the string into a QR generator when you build the enrollment screen. First make sure the secret matches exactly what your server stored, and replace the sample value JBSWY3DPEHPK3PXP, which is public and appears in every tutorial. The script makes no network calls at all: the URI is assembled in your browser and the secret never leaves it.
Frequently asked questions
Should the issuer appear in both the label and the query?
Can I set SHA256 or eight-digit codes?
Does it render the QR code?
Related Tools
TOTP vs HOTP Comparison
Compares TOTP and HOTP characteristics in a table and shows how each derives the one-time code.
CORS Config Validator
Validate a CORS configuration (allowed origins or *), checking the format and duplicates. Useful for safely configuring APIs and web servers.
Referrer-Policy Builder
Builds the Referrer-Policy header from a standard value (strict-origin, no-referrer, etc.).
Permissions-Policy Builder
Builds the Permissions-Policy header from a list of feature=allowlist entries (e.g. geolocation=()).
Password Generator
Generate strong, random passwords with custom length, uppercase letters, numbers and symbols. Generated in the browser — no data leaves your device.
Password Strength Checker
Analyze the strength of any password: length, character classes, entropy in bits and resistance estimate. Processed in the browser — the password never leaves your device.