No description
Find a file
2026-08-27 11:36:35 -05:00
keepassxc_totp_converter.py Add KeePassXC TOTP converter 2026-08-27 11:36:35 -05:00
README.md Add KeePassXC TOTP converter 2026-08-27 11:36:35 -05:00

KeePassXC TOTP Converter

A simple utility for converting an existing KeePassXC database into a TOTP-only database.

The converter creates a new database containing only entries that have TOTP configured. For those entries, it keeps only:

  • Title
  • Username
  • URL
  • TOTP

Passwords, notes, attachments, entry history, custom fields, Auto-Type settings, and entries without TOTP are removed.

The original database is not modified.

Requirements

Linux

You will need:

  • KeePassXC
  • Python 3

KeePassXC must include the keepassxc-cli command.

Verify with:

keepassxc-cli --version
python3 --version

Windows

You will need:

  • KeePassXC
  • Python 3

Download and install KeePassXC normally.

Python must also be installed and available from the command line.

Verify with:

keepassxc-cli --version
python --version

If keepassxc-cli is not in your PATH, you may need to add the KeePassXC installation directory to PATH.

Usage

The basic syntax is:

python3 keepassxc_totp_converter.py SOURCE.kdbx OUTPUT.kdbx

On Windows:

python keepassxc_totp_converter.py SOURCE.kdbx OUTPUT.kdbx

Example

Linux:

python3 keepassxc_totp_converter.py \
    ~/Passwords/passwords.kdbx \
    ~/Passwords/totp-only.kdbx

Windows:

python keepassxc_totp_converter.py `
    "C:\Users\User\Documents\passwords.kdbx" `
    "C:\Users\User\Documents\totp-only.kdbx"

The converter will prompt for the password of the existing database and then ask you to create a password for the new TOTP-only database.

Important

The conversion process temporarily exports decrypted database information so that it can be cleaned. Temporary files are automatically removed when conversion completes.

The resulting database should still be treated as sensitive because it contains your TOTP secrets.

Always keep a backup of your original KeePassXC database.