Mozilla Monitor website will be down for 2 hours starting 5/20/2025 at 6 AM PT. Visit our status site for updates.

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Restore Firefox passwords from time machine backup

  • 8 replies
  • 2 have this problem
  • 199 views
  • Last reply by cor-el

Note: all answers I can find on this forum and google are for older versions. The versions I'm using don't have any folder named firefox in Application Support

Issue: I have a time machine backup of my mac os high sierra.

I Made a fresh install of the OS and want to only restore firefox (specifically only the logins and passwords).

How can I achieve it?

thanks.

Note: all answers I can find on this forum and google are for older versions. The versions I'm using don't have any folder named firefox in Application Support Issue: I have a time machine backup of my mac os high sierra. I Made a fresh install of the OS and want to only restore firefox (specifically only the logins and passwords). How can I achieve it? thanks.

Chosen solution

What is the problem? Finding the files in the Time Machine backup or finding the current Firefox profile folder, so you can transfer the files you found in the Time Machine backup?


You can copy files like these with Firefox closed to the current profile folder to recover specific data.

  • logins.json (passwords) and key4.db (58+) or key3.db (57 and older) (decryption key) for Passwords saved in the Password Manager
    if you only have key3.db then make sure to remove an existing key4.db

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

See also:

Read this answer in context 👍 1

All Replies (8)

Chosen Solution

What is the problem? Finding the files in the Time Machine backup or finding the current Firefox profile folder, so you can transfer the files you found in the Time Machine backup?


You can copy files like these with Firefox closed to the current profile folder to recover specific data.

  • logins.json (passwords) and key4.db (58+) or key3.db (57 and older) (decryption key) for Passwords saved in the Password Manager
    if you only have key3.db then make sure to remove an existing key4.db

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

See also:

Thank you so much! I was searching for key3.db like stated in many tutorials, however looking for key4.db solved the issue!

And what we do for newer versions than 57? For example the latest 61.0.2

What I wrote above still applies to Firefox 61.

You need logins.json and key4.db (SQLite). If you have an older backup that only has logins.json and key3.db (DBM) then you need to remove an existing key4.db to make Firefox fallback to key3.db.

You might be able to find these files in the "Old Firefox Data" folder on the desktop in case you ever used the refresh feature in Firefox.

I try it only with "logins.json" file and work like a charm when i delete the login codes from firefox menu(for testing) and restore the file.

The file "key4.db" why it needed? Cause for me work even i backup ONLY the login file.

And why STOP exist add ons like: 01. Password exporter(https://addons.mozilla.org/el/firefox/addon/password-exporter)

02. https://addons.mozilla.org/el/firefox/addon/saved-password-editor

And there isn't any other to REPLACE THEM.

As MANY MORE old add ons.

Modified by Gregory

key4.db (and key3.db used previously) stores the encryption key that is used to encrypt the content in logins.json. Without the proper key file it isn't possible to decrypt this data. If there is already or still a correct key file present in the profile folder then you won't notice the difference, but it wouldn't work in a new profile that has its own default key file with a random salt key.

So let me see if i understand correctly. If you don't change profile then you don't need the keyb file i understand correctly?

The keyb file you need if ONLY if you change profile and you want these codes to new profile too correct?

Just be safe and always use the two files, then nothing will go wrong. You can never be sure that the key file will never get corrupted in case of issues with the passwords.