TOTP(1) General Commands Manual TOTP(1)

uri2totpgenerate TOTP codes from URIs

uri2totp [uri ...]

The uri2totp utility generates TOTP codes from ‘otpauth://’ URIs. If no uri is provided, then URIs will be read from the standard input, newline-separated.

For a URI to be considered valid it must have a scheme of ‘otpauth’ and a valid ‘secret’ query paramter. If no ‘digits’ or ‘period’ query parameters exist, the totp(1) default will be used.

The uri2totp utility exits 0 on success, and >0 if an error occurs.

Generate a TOTP code from a URI:

$ uri2totp 'otpauth://totp/foo?secret=DEADBEEF'

totp(1), trurl(1)

Thomas Voss <mail@tvoss.eu>

April 26, 2026 TOTP 3.0