How do I export saved passwords from my firefox password manager?

Solution 1:

The latest versions of Firefox store passwords, encrypted, in a JSON text file, logins.json, in your Firefox profile folder at /home/you/.firefox/ or /home/you/.mozilla/firefox.

This Python script will decrypt them all into a text file. Basic usage:

python firefox_decrypt.py

And answer prompt if necessary. Hit Enter on "master password" question if none set.

Update to clarify how. Do this in your home directory.

  1. wget https://raw.githubusercontent.com/unode/firefox_decrypt/master/firefox_decrypt.py (get raw script)
  2. python firefox_decrypt.py > out.json (export logins to file)

Solution 2:

With reference to answer above by @Sqerstet I simply downloaded the script firefox_decrypt.py, saved it on my Desktop and created a text file too on Desktop and then ran following commands:

jignesh@j-home-pc:~/Desktop$ python firefox_decrypt.py > my_pass.txt 

Master Password for profile /home/jignesh/.mozilla/firefox/nfa9v0da.default: (I didn't had one so I left it blank and hit Enter)
2018-02-01 12:25:07,223 - WARNING - Attempting decryption with no Master Password

jignesh@j-home-pc:~/Desktop$ 

And hurray I got all my saved login creds in plain format in the text file .

More information about where in Home folder Mozilla saves the data can be found on their support page. Quoting below the section for Passwords below for quick view:

Passwords: Your passwords are stored in the key4.db and logins.json files. For more information, see Password Manager - Remember, delete, change and import saved passwords in Firefox.

BTW before I was using this awesome add-on Password Exporter which was just fit for the Import and Export of Saved Passwords. Unfortunately this add is incompatible with Firefox Quantum version and hence I had to find some alternate solution and I ended up here and found the firefox_decrypt.py script the most easy to use compared to other offered Add-ons like

  • LastPass Password Manager
  • Roboform Password Manager

etc

To me they felt too much for my purpose of just exporting my passwords.

Thanks.

Solution 3:

There is an add-on for exporting your passwords.

https://addons.mozilla.org/addon/2848

Solution 4:

According to the support page the password data can be found in ~/.mozilla/firefox/key4.db and ~/.mozilla/firefox/logins.json files. These files needs to be read with some sqlite editor. There are other alternatives like extensions that do so too.

LastPass, Keepass and others password managers that use Firefox plugins, can import the data from Firefox directly and replace the password manager.