A terminal UI (TUI) application that decodes Google Authenticator export QR codes and lets you view live TOTP codes, then export your secrets to multiple formats.
- Scan QR code images — load a single image file or point to a directory to scan all images in it automatically
- Paste URIs directly — supports Google Authenticator bulk export URIs (
otpauth-migration://) as well as standard single-account URIs (otpauth://totp/andotpauth://hotp/) - Built-in file browser — modal tree browser for selecting images, directories, and export folders
- Live TOTP codes — decoded accounts displayed in a table with codes that update every second alongside a visual countdown timer
- Click to copy — click any table cell (issuer, account, secret, or code) to copy its value to the system clipboard
- Export to multiple formats:
- Apple Passwords CSV — for import into the macOS Passwords app
- Bitwarden CSV — for import into Bitwarden
- Aegis JSON — for import into Aegis Authenticator
- Individual QR code PNGs — one scannable QR code per account, importable by any authenticator app
- Usable as a Python library for programmatic access
PNG, JPEG, BMP, GIF, WebP, and TIFF.
- Python 3.12
- uv package manager
git clone https://github.com/CaptainCodeAU/google_auth_2fa_exporter.git
cd google_auth_2fa_exporter
uv syncuv run google-auth-2fa-exporterOr run directly:
uv run python main.py- Load accounts using one of two methods:
- File/Dir — enter the path to a single QR code image, or a directory containing multiple QR code images (all supported images in the directory will be scanned automatically). You can type the path directly or click Browse to open a file/directory picker. Then click Load.
- URI — paste a URI into the text field and click Load. Accepted formats:
otpauth-migration://offline?data=...(Google Authenticator bulk export)otpauth://totp/...(standard single-account TOTP)otpauth://hotp/...(standard single-account HOTP)
- View accounts — the table shows Issuer, Account, Secret, and a live Code column. Codes refresh every second. The TOTP countdown timer bar shows how many seconds remain in the current 30-second window.
- Copy values — click any cell in the table to copy its value to the system clipboard. A toast notification confirms the copy.
- Export — enter an output directory (or click Browse to select one), then click one of the export buttons:
- Apple CSV — produces
apple_passwords_export.csv - Bitwarden — produces
bitwarden_export.csv - Aegis — produces
aegis_export.json - QR Codes — produces one
Issuer (Account).pngfile per account
- Apple CSV — produces
- Quit — press
Ctrl+Qor close the terminal
| Key | Action |
|---|---|
Ctrl+L |
Load accounts |
Ctrl+O |
Browse for file/directory |
Ctrl+Q |
Quit |
uv run google-auth-2fa-exporter --version
uv run google-auth-2fa-exporter --helpfrom google_auth_2fa_exporter import decode_uri, extract_accounts
# From a Google Authenticator bulk export URI
accounts = decode_uri("otpauth-migration://offline?data=...")
# From a standard otpauth URI
accounts = decode_uri("otpauth://totp/GitHub:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=GitHub")
# From a single QR code image
from pathlib import Path
accounts = extract_accounts(Path("export_qr.png"))
# From a directory of QR code images
accounts = extract_accounts(Path("./qr_images/"))
for acct in accounts:
print(f"{acct.issuer}: {acct.name} — secret: {acct.totp_secret}")# Install with dev dependencies
uv sync --group dev
# Run tests
uv run pytest
# Lint
uv run ruff check src/ tests/
# Format
uv run ruff format src/ tests/If you modify google_auth.proto:
uv run python -m grpc_tools.protoc -I. --python_out=. --mypy_out=. google_auth.proto
cp google_auth_pb2.py google_auth_pb2.pyi src/google_auth_2fa_exporter/MIT
