DEV Community

Wai Liu
Wai Liu

Posted on

Retrieving deleted passwords in Chrome

Scenario

I accidentally cleared my browsing data including Passwords in Chrome whilst synced to my chrome account

By clicking on Clear Data here
Image description

This is how you know if you're syncing to your google account

Image description

When this happens, it'll delete the passwords from the google cloud servers as well as all your devices.

How to fix

First, this is a bad situation. The only way you can retrieve the passwords is if you have a second device that is also synced to google. This could be another laptop, a mobile etc. but whatever it is - immediately, turn off the wifi on it.

This is because as soon as Chrome has a chance to go on the Internet, it'll sync and delete all the passwords on there too. For me, I had a second laptop and I drove a couple of blocks from my house to make sure it didn't accidentally pick up the wifi whilst I was unlocking it.

Exporting your password

After you have deprived the device of network access, let's immediately export the passwords so whatever happens, we know we still have them.

You can do that by going to the password screen

Image description

And clicking on Export password under the ellipsis in Saved Passwords

Image description

Note this will create a cleartext CSV file with all your passwords. This is just for backup purposes - I would delete this once everything is running again.

Turn off the sync

After I deprived the device of network access, I turned off the sync on it.

Go to Chrome Settings, You and Google and click Turn Off.

Image description

Very important here is to make sure to leave the Clear bookmarks, history, passwords checkbox unchecked.

Image description

Turn the sync back on

Once you've logged out, turn your wifi back on.

You should notice that your browser profile no longer is logged in but it still has your passwords stored against it.

If you log back in and turn on sync, it should reinstate your password back to your Google account.

Image description

If you check your other devices you should be able to see that the passwords have been reinstated on the cloud account.

Top comments (0)