Mozilla Firefox has been my primary web browser for over a decade now. It might not be the fastest browser out there for the Windows operating system but does the job for me.
Before Firefox 57 (Firefox Quantum), we could easily import and export passwords saved in the Firefox browser by installing an add-on. This helps when you want to backup passwords saved in Firefox or when you want to reinstall Windows OS.
As you likely know, add-ons that helped you import and export passwords saved in Firefox did not work in Firefox 57 and later versions. Although you could view the passwords saved in Firefox by navigating to Preferences > Privacy & Security > Saved Logins section, there was no option to export or import (import from a file) passwords.
Most of the Firefox users are using third-party password saving solutions like LastPass and KeePass and won’t need an option to export passwords. Since these password managers are cloud-based (save passwords in the cloud), not all users want to use them for security reasons. Like many of you, I prefer using Firefox’s built-in password manager (with a master password, of course).
Like me, if you also use Firefox’s built-in password manager and looking for a way to backup Firefox passwords, you have very limited options.
Luckily, with Firefox 79, Mozilla has introduced an option to export saved passwords to a CSV file. However, there is no option yet to import passwords from a CSV file.
In this guide, we will discuss the four easy ways out there to backup Firefox passwords in Windows OS.
Method 1 of 5
Export Firefox passwords to CSV file
Version 79 (available in Nightly builds) and later versions of Firefox offer an in-built option to export saved passwords to CSV file. Here is how to do that.
Step 1: Type about:logins in the Firefox address bar and press the Enter key. This will open the page where you can view your saved credentials.
Step 2: Here, to export all saved passwords, click on the three vertical dots icon (refer to the picture below) and then click the Export Logins option.
Step 3: For security reasons, Firefox asks you to enter your Windows account password, fingerprint scan, or PIN before exporting the password. When asked, please do so to continue.
Step 4: Finally, browse to the location where you would like to save the CSV file containing the password, select the folder, type a name for the CSV file, and then click the Save button.
Method 2 of 5
Manually backup key4.db and logins.json files
Firefox saves your passwords in key4.db and logins.json files. These files are located in your Firefox profile folder. You can backup these two files to export all passwords. After reinstalling Windows or Firefox, you can restore these two files again to import passwords. Here is how to do that.
To export passwords
Step 1: Open the Run command dialog. Type the following path and then press Enter key to open Firefox Profiles folder.
%APPDATA%\Mozilla\Firefox\Profiles\
Step 2: Under the Profiles folder, you should see your profile folder. If you have more than one profiles, you will see two or more folders. If you have only one profile, your passwords are stored in the default profile.
Step 3: Open up the profile folder and locate key4.db and logins.json files. Copy these files and save them in a safe location (preferably offline) to backup passwords.
To import passwords
We advise you to do this immediately after reinstalling Firefox or Windows as replacing existing key4.db and logins.json files with previously backed up files will delete currently saved passwords, if any.
Step 1: Open the Run command box, type the following path and then press Enter key to open Profiles folder.
%APPDATA%\Mozilla\Firefox\Profiles\
Step 2: Open up the profile folder. Copy and paste the previously backed up key4.db and logins.json files to your profile folder. That’s it!
Method 3 of 5
Use PasswordFox to backup Firefox passwords
PasswordFox is a free utility from the well-known NirSoft and is trustable. Simply download and run PasswordFox to view all saved passwords in Firefox. It shows all password saved in Firefox along with username and URL. It’s important to note that this tool works great on Firefox 57 and 58 as well.
To export all passwords to an HTML file, select all passwords and then click HTML Report – All items option. If you want to backup only select passwords, select passwords that you want to backup and then click HTML Report – Selected items option.
Method 4 of 5
Use FF Password Exporter to export passwords
FF Password Exporter is a free program for both Windows as well as macOS to back up passwords saved in the Mozilla Firefox browser. It enables you to export saved passwords to CSV or JSON files.
Method 5 of 5
Manually note down Firefox passwords
If you don’t want to use a third-party solution and don’t want to backup Key4.db and Logins.json files as well, you have no option but to manually backup all saved passwords by noting down each username and password. The method becomes cumbersome when you have tens of passwords.
Step 1: Open Firefox. Press the Alt key, click Tools, and then click Options.
Step 2: Switch to the Privacy & Security tab. Click the Saved Logins button and then click Show passwords button to view all saved passwords. If you have set a master password, you need to type the same to view all saved passwords.
Step 3: Note down all usernames, URLs, and passwords in a text editor or piece of paper.
You might also like to read our how to backup passwords saved in the Chrome browser.
Firas says
Thank you
Bela Torkos says
I am dissatisfied withFF recently. It is slower as its numer goes higher.
One important thing: I should have the option to save my saved logins in a text file or doc file or html file, just like I can do it with bookmarks. Saving bookmarks has a fair solution, extracting passwords saved is an awefully cumbersome process. If my passwords are not so sensitive, I should be allowed to easily get them out, not writing them manually as someone from Firefox suggested. It is a shame this has not been solved.
Thank you for your hoped understanding and help.
Turkeyhead says
It’s MY computer and I want my goddamn passwords!
John Smith says
As a professional Pentester I hack into Windows systems all the time. Saving passwords in Browsers is convenient but a really POOR choice from a security point of view. You should never save passwords in Chrome, Edge, IE, Firefox or other browsers, even Mac or Linux based browsers. It’s too easy to recover such information. Instead use a good password manager that securely encrypts the passwords in a digital vault. For example; KeePass or 1Password. While Password Mangers are not a bullet proof solution, they are much more secure than browsers.
Joku Toinen says
I must confess I’m a lazy person. If I need to switch to a new computer, I simply take the complete .mozilla and .thunderbird directories with everything in it with me on a thumb drive. This way I get all my addons, bookmarks and settings too.
Current FF User...for now says
It is really stupid that FF no longer allows us to add to our passwords and logins. I’m rethinking using FF due to this inconvenience. What is the reason for this? All you are doing is making use of your browser more difficult.
Seoxan says
Hello, thank you for providing these great tips. I use Firefox for years, it is best browser.
Shuravee says
Karim, you ROCK!!!
Maggie Barnes says
I’m going to reinstall my Windows 7 Pro (64-bit) system. After some research, I feel safe with FF Password Manager, since they SAY they now store the Password database on my PC in encrypted form.
However, finding out here that I will be unable to Backup and Restore my Passwords in FF is making me rethink using FF at all.
As far as I can tell, it is the ONLY password manager that fails to provide this important feature. Are they THAT afraid that someone may jump ship and they are trying to make it as difficult as possible for them? More likely, their failure to include this feature will make folks reconsider using FF altogether.
There is no acceptable excuse for FF failing to provide AT LEAST a Backup and Restore (or even a standard import/export).
Karim says
Hey Alex,
If you have always the problem, i have the soltion :
– Copy your entire firefox support to a usb key
– Delete pkcs11.txt
– Transfer to a new computer
Good luck.
Karim says
Hello Alex,
I don’t know if you solve your problem, but i have the answer.
I experimented the problem myself today…
Copy your profile but avoid one file : pkcss11.txt
And all will be fine.
Piet de Vries says
Amazing that there is not automated tool to do this…
I can setup a Firefox account that will store *all* my accounts and all my passwords ‘somewhere’ in the cloud without as much as the blink of an eye, but exporting the same to your own, local machine requires me to freaking copy/paste EVERY item?!?
This is not bad programming, this is blackmail! “Give us your passwords or spend a few hours”…
And says
It is actually a shame (can you or anyone notice that?) than in well developed and prospering browser there is no such a simple option which would took programmers few minutes.
Alex says
Hello: I have, since the last couple of weeks, a different problem. I didn’t need a password export: I know where my profiles data are stored.
I now use only a Mac, but I’ve always easily managed my Firefox files also under win.
After Quantum was released, causing the impossibility to take advantage of some very useful extensions, I’ve been using both versions, the “old” 56 and the new Quantum, now 62.
I also have the Profile Manager displayed at the start of FF. Obviously, if I launch FF62 and then FF56, I can’t use the same profile because it’s “in use”; but this is also useful to open 2 different profiles with the 2 browsers. It’s not like the very useful Plugin for FF56, but it’s something.
Well: until a couple of weeks ago, whatever version I launched (obviously only one session at the time) with my main profile I had all my passwords correctly read by both FF56 or FF61 and now 62.
But now, FF56 is no longer able to read them and I found out that it autonomously disabled the master password. If I try to re-enable it, it seems to complete the operation but then, after I relaunch FF56, I find it again disabled and the list of passwords is empty.
So, it’s not a problem with key4.db or logins.json because they are there and used by FF62 but not anymore by FF56. What could it be the reason? Some other file like like cert8.db or cert9.db?
Rob riddle says
I have a password list of about a hundred items. A simple use of Windows snipping tool (snip save, scroll, snip save scroll… until you have them all) as .png files stored anywhere you want. A bit of a pain, but it is done.
TheCIA says
OPSEC – this is not a good practice. writing down passwords is a good way to have them compromised.
do not recommend.
user says
Manually note down?
100% guaranteed mistakes/errors./misspelings
Alexfofo says
meth.1 : it’s not an export but a sav : you can only use for FF not for an import elsewhere (like keepass…)
meth2 : PasswordFox don’t work with quantum…
meth3 : are you kinding me ! you forgot to specify that you have to put them just above the keyboard