With iOS 18, Apple introduced the Passwords app, a built-in password manager that replaces the need for a third-party password manager within the Apple ecosystem, especially when sharing passwords with family. This new functionality allows seamless password sharing among family members, something that wasn’t easily achievable before. Having used Strongbox on my iOS device and paid for it, I decided it was time to switch to the new Passwords app.
However, I found no direct solution to migrate from a KeePass database (kdbx format) to Apple’s Passwords app that met my needs—especially one that could handle exporting custom fields and using an additional keyfile. Therefore, I’ve created this guide to help you write your own converter based on the information found here.
Open the Strongbox App
Open your Strongbox app and navigate to the database containing your passwords. Then go to Settings > Advanced Settings, click on Export Database, and export your current passwords database as a zip file containing the kdbx file. The kdbx file (KeePass Database Format) includes all the data stored in your password manager, such as custom fields and attachments.Set Up the Environment
To create a Python script for the conversion, follow these steps:1 2 3 4 5 6
mkdir kdbx2csv cd kdbx2csv python -m venv venv source venv/bin/activate pip install pykeepass touch kdbx2csv.py
Create the Python Script
Open thekdbx2csv.py
file with your favorite text editor and paste the following content:
|
|
Feel free to customize the script to suit your specific needs.
- Activate the Python Environment
If you haven’t already activated the environment, do so now:
|
|
Place the Files in the Directory
Copy your kdbx file (e.g.,my_storage.kdbx
) into the kdbx2csv directory, along with the keyfile (e.g.,my_storage.key
) if you have one.Run the Script
Execute the script using the following commands:With keyfile:
1
python3 kdbx2csv.py my_storage.kdbx --keyfile my_storage.key converted_pass.csv
Without keyfile:
1
python3 kdbx2csv.py my_storage.kdbx converted_pass.csv
Import the CSV into Apple Passwords
Now open Safari, go to File > Import from and select CSV file with passwords…. Choose the CSV file you generated (e.g.,converted_pass.csv
).
Customize to Your Needs
Feel free to adjust the script to add features or handle specific cases you may encounter, such as exporting additional fields or handling OTPs. Enjoy using Apple’s Passwords app with your migrated data!