freeotp-export-reader¶
A command line tool to extract the OTP token details from a FreeOTP (Android) backup file. You can then add your tokens to the OTP feature of KeePass or KeePassXC.
The tool decrypts the backup using your backup password and writes the details of all tokens as pretty-printed JSON. For each token, you get:
- name, issuer and label
- token type (TOTP or HOTP)
- the secret key in base32 (plus hex and base64)
- hash algorithm, digits, period and counter
- the Steam code encoding, where used
- ready-to-use KeePass OTP fields and an
otpauth://URI - all other metadata stored in the backup (color, image, lock flag, last use, ...)
Installation¶
Pick one of these options:
- Standalone executable: download the file for your platform from the releases page. No Python needed.
- Windows (x64), Linux (x64) and macOS (Apple Silicon)
- the file names include the version and platform, e.g.
freeotp-export-reader-0.4.0-linux-x86_64; rename the file tofreeotp-export-reader(freeotp-export-reader.exeon Windows) for easier use - Linux and macOS: make the file executable with
chmod +x - macOS: the executable is not signed, so macOS blocks it at first; allow it under System Settings → Privacy & Security, or run
xattr -d com.apple.quarantine freeotp-export-reader SHA256SUMSon the releases page lists the checksums of all files
- Single script: download
freeotp_export_reader-<version>.pyfrom the releases page, orfreeotp_export_reader.pyfrom the repository. It runs on its own, without any other project files. It needs uv, which installs Python 3.14 and the dependencies for you. -
From the repository, using
uvx:
Getting started¶
First, create a backup in the FreeOTP app: open the menu, choose Backup and save the file (e.g. freeotp-backup.xml). Copy it to your computer.
Then run the tool on the backup:
freeotp-export-reader freeotp-backup.xml # standalone executable
./freeotp_export_reader.py freeotp-backup.xml # single script
uv run freeotp_export_reader.py freeotp-backup.xml
The script declares its dependencies inline (PEP 723), so uv installs Python 3.14 and the required packages automatically.
The tool prompts for the backup password and prints the JSON to stdout. See Usage for all options.
Warning
The output contains your OTP secrets in plain text. Handle it like a password file: keep it only as long as needed and never commit it anywhere.
Supported backup formats¶
- FreeOTP 2.x external backups made with the Backup menu entry. Despite the
.xmlname, these are Java serialized maps. - Android shared preferences XML files (
tokenBackup.xml), e.g. from an Android auto backup
License¶
Licensed under the Apache License, Version 2.0.
Copyright (c) 2026, eGenix.com Software, Skills and Services GmbH, Langenfeld, Germany.
Authors: Marc-André Lemburg mal@egenix.com, eGenix.com Software, Skills and Services GmbH