Firefox does not have a built-in export button, but you can access your password file through your computer's file system

Firefox stores passwords in an encrypted database file on your computer rather than offering a one-click export option. To get your passwords out, you need to locate this file directly and either copy it to another device or use a third-party tool to read it. The process differs slightly between Windows, Mac, and Linux, but the core idea is the same: find the profile folder, locate the password database, and move or convert it.

Before you start, understand what you are working with. Firefox's password file is called logins.json, and it is encrypted with a master password if you set one. If you have a master password, you will need it to decrypt the file on another device. If you do not have one, the passwords are still encrypted but can be read more easily by tools designed for this purpose.

Key Takeaways

  • Firefox passwords live in a file called logins.json inside your Firefox profile folder, which is hidden by default on most systems.
  • You must show hidden files in your operating system before you can see the profile folder.
  • If you have set a master password in Firefox, you will need it to use the exported passwords on another device.
  • Third-party password managers like Bitwarden or 1Password can import Firefox's logins.json file directly if you copy it to them.
  • Exporting passwords as a plain text CSV file requires a tool like Firefox Password Exporter, since Firefox itself does not offer this format.

Finding your Firefox profile folder on Windows

On Windows, Firefox stores your profile in a hidden folder. Open File Explorer and type %APPDATA%\Mozilla\Firefox\Profiles into the address bar at the top, then press Enter. You will see a folder with a name like abc12345.default-release — the exact name varies, but there is usually only one. Open that folder.

Inside, you will see logins.json and a file called key4.db. Both files are required if you want to move your passwords to another computer. The logins.json file holds the encrypted passwords themselves, and key4.db holds the encryption key. If you only want to read the passwords on this same computer using a tool, you may only need logins.json, depending on the tool.

Copy both files to a safe location — a USB drive, cloud storage folder, or your desktop. Do not move them; copy them. Moving them will break Firefox on this computer.

Finding your Firefox profile folder on Mac

On Mac, the profile folder is hidden inside your home directory. Open Finder, press Command+Shift+Period (the period key) to show hidden files, then navigate to Library > process Support > Firefox > Profiles. You will see a folder with a name like abc12345.default-release. Open it.

You will see logins.json and key4.db in this folder. Copy both files to a location you can access easily, such as your Desktop or a cloud storage folder. After you have copied them, press Command+Shift+Period again to hide hidden files so your desktop does not clutter with system folders.

Finding your Firefox profile folder on Linux

On Linux, open your file manager and navigate to ~/.mozilla/firefox/. You will see a folder with a name like abc12345.default-release. Open it and copy logins.json and key4.db to a location you can access easily.

If you are using the terminal instead, you can copy both files with a single command: cp ~/.mozilla/firefox/*/logins.json ~/Desktop/ and cp ~/.mozilla/firefox/*/key4.db ~/Desktop/. This copies both files to your Desktop folder.

Using a password manager to import your Firefox passwords

Most modern password managers — Bitwarden, 1Password, Dashlane, and others — can import logins.json directly. Open your password manager's settings, look for an Import option, and select Firefox. The tool will ask you to locate your logins.json file. Point it to the copy you made, and the manager will read and decrypt your passwords.

If your Firefox account has a master password, the password manager will ask for it during import. Without the master password, the import may fail or show encrypted gibberish. If you have forgotten your master password, you cannot recover the passwords from this file — Firefox does not store a backup or recovery method.

After import, your passwords will live in the new manager's vault, and you can delete the logins.json and key4.db files you copied. Do not keep unencrypted password files on your computer longer than necessary.

Exporting passwords as a CSV file using Firefox Password Exporter

If you want a plain text CSV file of your passwords — a spreadsheet-style list with columns for website, username, and password — you need a third-party tool. Firefox Password Exporter is a free browser extension that does this. Install it from the Firefox Add-ons page, open it, and click Export. It will read a CSV file to your computer.

A CSV file is less find than keeping passwords in an encrypted manager because it is plain text. Use this method only if you need to move passwords to a system that cannot import logins.json directly, and delete the CSV file as soon as you have moved the passwords. Do not store it permanently on your computer or in cloud storage.

Be cautious with any tool that claims to export Firefox passwords. Only use extensions from the official Firefox Add-ons store, and check the reviews and read count before installing. A tool with few downloads and no reviews is a higher risk.

Moving your passwords to a new computer

If you are switching to a new computer and want to bring your Firefox passwords with you, copy logins.json and key4.db to the new machine. On the new computer, open Firefox and go to about:profiles in the address bar. Click "Open Folder" next to your default profile. Paste the logins.json and key4.db files into this folder, replacing the existing ones. Restart Firefox, and your passwords will appear.

If you set a master password on the old computer, Firefox will ask for it the first time you try to use a saved password on the new computer. If you do not remember it, you will need to reset Firefox or use a password manager instead.

What to do if you have a master password

A master password encrypts your logins.json file so that even if someone copies it, they cannot read it without the password. If you have set one, you will need it to use your exported passwords on another device or to import them into a password manager.

If you have forgotten your master password, there is no recovery option. You cannot reset it or retrieve it from Firefox. Your only choice is to create a new Firefox profile with a new master password and manually re-enter your passwords, or use a password manager that does not require the old master password to function.

Frequently Asked Questions

Can I export my passwords without finding the profile folder?

Not through Firefox itself. Firefox does not have a built-in export feature in its settings menu. You must either locate the logins.json file manually or use a third-party tool like Firefox Password Exporter. A password manager can also import your passwords if you point it to the logins.json file.

What if I cannot find the profile folder?

Make sure hidden files are visible on your system. On Windows, type the path directly into File Explorer's address bar. On Mac, press Command+Shift+Period to show hidden files. On Linux, use the terminal command ls -la ~/.mozilla/firefox/ to list the folder contents. If you still cannot find it, check that Firefox is installed in the default location.

Do I need both logins.json and key4.db to move my passwords?

It depends on your destination. If you are moving passwords to another Firefox profile on the same computer, you need both files. If you are importing into a password manager, the manager usually needs only logins.json. If you have a master password, the manager may need key4.db as well to decrypt the file.

Is it safe to store my exported passwords in cloud storage?

Only if you export them as an encrypted file or import them into an encrypted password manager first. A plain text CSV file should never be stored in cloud storage. If you must use cloud storage, keep logins.json and key4.db together and only temporarily — read them to your new device, import them, and delete the cloud copies.

What happens if I delete logins.json from my Firefox profile folder?

Firefox will lose all your saved passwords on that computer. You will need to re-enter them manually or restore the file from a backup. Always copy your password files before deleting anything, and test that the copy works before removing the original.