ffpass

repository·master·Indexed 18 days ago

https://github.com/louisabraham/ffpass

A Python-based utility for importing and exporting Firefox passwords via CSV files. It enables password migration between browsers, such as Google Chrome and Firefox, and requires Python 3.6+ and Firefox 58+.

Tokens
1.1K
Snippets
5
Records
6
Agent score
14%

What's inside ffpass

  1. Transfer passwords from Google Chrome to Firefox

    master

    On Windows and macOS, Firefox can often import directly from Chrome via File > Import from Another Browser.... If you need to use ffpass:

    1. Export from Google Chrome

    1. Open chrome://flags/#PasswordExport in Chrome.
    2. Set Password export to Enabled and click Relaunch Now.
    3. Go to Settings > Advanced > Passwords and forms > Manage passwords.
    4. Click the menu icon next to Saved Passwords and choose Export.
    5. Save the file as passwords.csv.

    2. Import into Firefox

    1. Stop Firefox.
    2. Run the import command:
    ffpass import --file passwords.csv
    1. Restart Firefox (ensure no background processes remain).
  2. Transfer passwords from Firefox to Google Chrome

    master

    1. Export from Firefox

    1. Stop Firefox.
    2. Run the export command:
    ffpass export --file passwords.csv

    2. Import into Google Chrome

    1. Open chrome://flags/#PasswordImport in Chrome.
    2. Set Password import to Enabled and click Relaunch Now.
    3. Go to Settings > Advanced > Passwords and forms > Manage passwords.
    4. Click Import and select your passwords.csv file.
  3. Install ffpass

    master

    Install ffpass using pip. This tool requires Python 3.6+ and works with Firefox 58+.

    Note: Firefox must be closed during the entire export or import process, as these actions modify its database. If you use Firefox Sync, you must disconnect and reconnect your Firefox account after importing passwords to restore synchronization.

    pip install ffpass
  4. Troubleshoot ffpass errors

    master

    Profile Selection Errors

    If you see ffpass export: error: the following arguments are required: -d/--directory/--dir, it means automatic profile selection failed. This happens if:

    • Automatic selection is not supported on your platform.
    • You have multiple Firefox profiles.

    Solution: Provide the explicit path to your Firefox profile using the --dir flag. Use Mozilla's guide to find your profile folder.

    Empty Database Error

    Firefox password database is empty. Please create it from Firefox.

    Solution: ffpass cannot create a new database for security reasons. Open Firefox and manually add at least one password to initialize the database.

    Sync Issues

    Importing passwords breaks Firefox Sync.

    Solution: Disconnect your Firefox account in the Sync options and then re-add it.

    URL Formatting Issues

    If URLs appear as just example.com (missing the scheme) in Firefox:

    Solution: Ensure the source CSV file includes the protocol (e.g., https://example.com) in the url column.

  5. Export passwords to CSV

    master

    Use the ffpass export command to output your Firefox passwords to a CSV file with the header url,username,password.

    By default, the output is sent to stdout. You can specify a target file using the -f or --file flag, or point to a specific Firefox profile directory using the -d or --directory flag.

    CLI Arguments:

    • -f FILE, --file FILE: File to export passwords to (defaults to stdout).
    • -d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY: Firefox profile directory.
    • -v, --verbose: Enable verbose output.
    ffpass export > passwords.csv
    # OR
    ffpass export -f passwords.csv
  6. Import passwords from CSV

    master

    Use the ffpass import command to import passwords from a CSV file into Firefox. The tool is compatible with CSV files exported from Google Chrome (columns url,username,password are order-insensitive).

    CLI Arguments:

    • -f FILE, --file FILE: File to import from (defaults to stdin).
    • -d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY: Firefox profile directory.
    • -v, --verbose: Enable verbose output.

    CSV Formatting Rules: If the CSV was not exported from Google Chrome, ensure:

    1. Headers are exactly url, username, and password. Other columns are ignored.
    2. URLs include the protocol scheme (e.g., http:// or https://). Without this, URLs may appear empty or incorrect in Firefox.
    3. Quotes around fields are handled automatically; consistency in quoting is not required.
    ffpass import < passwords.csv
    # OR
    ffpass import -f passwords.csv