# scito/extract_otp_secrets

Extract one time password (OTP) secrets from QR codes exported by two-factor authentication (2FA) apps such as "Google Authenticator". The exported QR codes from authentication apps can be captured by camera, read from images, or read from text files. The secrets can be exported to JSON or CSV, or printed as QR codes to console.

Repository: https://github.com/scito/extract_otp_secrets
Canonical: https://ross.abutalabs.com/products/extract_otp_secrets
Homepage: https://scito.ch/content/extract-secret-keys-google-authenticator-qr-export
Language: Python
License: GPL-3.0
License Family: copyleft
Topics: otp, otpauth, python, recovery, google-authenticator, proto3, totp, qr-codes, tfa, csv, json, protobuf, security, qrcode, 2fa, two-factor, two-factor-authentication, security-tools, standwithukraine, mfa
Last push: 2026-08-26T15:54:56+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 82, longevity 100
- inputs: {"age_days": 2293, "days_push": 7, "days_rel": 40, "gap_med": 48.0, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1647, forks 162 (observed 2026-08-28T04:05:16.458201+00:00)

## What it is
A Python CLI tool that extracts one-time password (TOTP/HOTP) secrets from QR codes exported by two-factor authentication apps like Google Authenticator. It reads QR codes from camera capture, image files, or text files, and exports the secrets to JSON, CSV, or as QR codes printed to console or saved as PNG.

## Use cases
- extract otp secrets from google authenticator export qr codes
- recover 2fa secret keys after losing my phone
- backup google authenticator accounts to json or csv
- decode otpauth-migration qr code data
- migrate two-factor accounts between phones
- read totp secrets from qr code images
- print otp secrets as qr codes to console

## When to choose
- you need to back up or migrate 2FA secrets from Google Authenticator export QR codes
- you want offline, scriptable extraction of OTP secrets with JSON/CSV output
- you need cross-platform recovery of TOTP/HOTP keys from images, camera, or text files

## When to avoid
- you need a GUI-first password manager or authenticator app rather than a CLI extraction tool
- your 2FA app does not support QR export or uses a non-otpauth-migration format
- extracting secrets from devices you do not own - this is for legitimate account recovery only

## Facets
- artifact type: cli-tool
- maturity: active
- function: security, parser, cli, serialization, image-processing
- domain: security, privacy, developer-tools
- platform: python, windows, cli, cross-platform
- tags: otp, totp, hotp, 2fa, google-authenticator, qr-code, otpauth, protobuf, backup, recovery, mfa, command-line, linux, macos, docker

## Member repositories
- scito/extract_otp_secrets (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:16.458201+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:45:21.265888+00:00, confidence not recorded.
  - readme: https://github.com/scito/extract_otp_secrets (fetched 2026-08-28T04:05:16.458201+00:00, sha 4bc02f4797b7)
  - homepage: https://scito.ch/content/extract-secret-keys-google-authenticator-qr-export (fetched 2026-08-29T11:18:54.708271+00:00, sha 174d943c794f)
  - site_page: https://scito.ch/content/about (fetched 2026-08-29T11:18:54.717711+00:00, sha 2ee695f51f13)
- Data as of 2026-08-30T08:39:29.467469+00:00.
