Import and Export passwords for Firefox Quantum 🔑
The latest version of Firefox doesn't allow to import or export the stored logins and passwords as a file.
This tools interacts with the encrypted password database of Firefox to provide these features.
ffpass requires Python 3.6+ and will work with Firefox 58+
pip install ffpass
Note: Firefox must be closed during the whole process, as these actions change its database.
Note: If you have Sync enabled, you'll have to disconnect and reconnect your Firefox account after importing the passwords.
ffpass export > passwords.csv
ffpass export -f passwords.csv
ffpass export --file passwords.csv
usage: ffpass export [-h] [-t TO_FILE] [-d DIRECTORY] [-v]
outputs a CSV with header `url,username,password`
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE file to export password (defaults to stdout)
-d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY
Firefox profile directory
-v, --verbose
ffpass import < passwords.csv
ffpass import -f passwords.csv
ffpass import --file passwords.csv
By default, it works with the passwords exported from Google Chrome.
usage: ffpass import [-h] [-f FROM_FILE] [-d DIRECTORY] [-v]
imports a CSV with columns `url,username,password` (order insensitive)
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE file to import from (defaults to stdin)
-d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY
[Firefox profile directory](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
-v, --verbose
For CSV files not exported from Google Chrome, take these formatting rules into consideration:
1. The CSV must have the headers "url", "username", and "password". Any other columns will be safely ignored.
2. The url must be formatted to include all prefixes ("http://", "https://", etc), or ffpass will not be able to read them correctly.
3. ffpass does not care if the CSV has quotes around fields, even if some fields have them and others don't.
Now, Firefox can more accurately import logins saved in Chrome/Chromium on Windows and macOS (including timestamps, deduping, http auth. logins, etc.) so you don't need to use this tool on those operating systems. See File > Import from Another Browser… in Firefox to import.
chrome://flags/#PasswordExport
passwords.csv
(or any other
available name).(instructions from https://support.1password.com/import-chrome/)
ffpass import --file passwords.csv
Restart Firefox, making sure it didn't leave any process still open.
ffpass export --file passwords.csv
chrome://flags/#PasswordImport
passwords.csv
and click Import.ffpass export: error: the following arguments are required: -d/--directory/--dir
It means one of the following (launch with option --verbose
to
know):
You have to provide the --dir
option with your Firefox Profile
Folder. To find it, follow these
instructions
on the website of Firefox.
Firefox password database is empty. Please create it from Firefox.
It means that Firefox currently doens't store any password. ffpass
cannot create the password database for security reasons. Just add
one password manually to Firefox to create the database.
TypeError: 'PosixPath' object is not iterable
See #17.
Empty url field ("example.com") in Firefox after importing: the urls of the source
csv file must begin with a scheme (http://
, https://
, ftp://
,
etc…)
Passwords do not sync to other devices, including Lockwise app.
Importing passwords break the sync. You'll have to disconnect the Firefox account in the Sync options and the re-add it.
Thanks a lot to @lclevy for the retro-engineering! I was inspired by his repository https://github.com/lclevy/firepwd.