Import Saved Logins to Firefox using csv/json file.

If you like me who want to take advantage of the Firefox Lockwise for password management, then check the procedures below to import logins to Firefox using csv file.

Likely you would need a pre-v70 Firefox install if your current firefox is updated. This might be due to the new lockwise.

Steps to Prepare your CSV file and convert to JSON format:

    1. Make sure the headers of CSV file, which contains all your logins, are “hostname”, “username”, “password”, like screenshot in the link.
    2. Convert the CSV file to the JSON format. There are multiple tools and scripts online to assist. I used miller tool on linux to do the conversion.
    3. mlr --icsv --ojson --jlistwrap cat sample.csv

Steps to import the logins:

  1.  On the Pre-v70 Firefox, enable the command line in Browser Console by access “about:config” and set “” to be true.
  2. Open the Browser Console by pressing Ctrl+Shift+J
  3. Paste the code below to the Browser Console:
  4. When prompted, paste the content of your json file.

signons = '[{"username":"xxx","password":"xxx","hostname":"https://"},{more-logins}]';
if (logins = prompt("Logins JSON: [{},{}]",signons)){
try {
logins = JSON.parse(logins);
} catch(e){ console.log(e); }

Now you would need to login to the Firefox account so the logins can be synced, which means you would be able to access them in your Firefox account lockwise. Once synchronization is done, you could delete the Pre-v70 firefox from your computer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s