Tool to migrate accounts from Google Authenticator to any other 2FA generator, without removing and re-registering 2FA!
This tool parses the QR code(s) that the "Export Accounts" feature of the Google Authenticator app generates, extracts relevant data, and then generates a new QR code for each extracted account. The generated QR code can be scanned with any 2FA generator app to import that account. All this without having to remove and re-add 2FA through the account's management portal!
The tool supports ingesting either images containing the QR code generated by Google Authenticator, or the text contents of those QR images. Either inputs are controlled with command line arguments:
Argument | Effect | Example |
---|---|---|
--image [PATH] |
Parse an image containing a QR code generated by Google Authenticator. Can have multiple values. | --image input1.png input2.png |
--text [TEXT] |
Ingest the raw text content of a QR code generated by Google Authenticator. Can have multiple values. | --text otpauth-migration:\\... |
--output_directory [PATH] |
Controls the output directory in which generated QR codes for extracted accounts are saved. Single value. Optional. By default the output is saved in the current directory of the Python file | --output_directory .\my_outputs |
For this example, we'll call this image input.png
.
python gauthexport.py --image input.png --output_directory .\output
This image contains the following content:
otpauth://totp/username@mail.com?secret=DJVUENBVOAWEIVKAWE&issuer=serviceprovider
and would have been saved to output path:
.\output\GAuthExport_username@mail.com_DJVUENBVOAWEIVKAWE_serviceprovider.png