22
13
I want to be able to export passwords from Chrome browser so that I can make a printed copy.
22
13
I want to be able to export passwords from Chrome browser so that I can make a printed copy.
29
There are several solutions listed below, not all of them might work with the latest versions of Chrome. The 'official' Google Chrome/Canary solution is the only one which is currently reliable. Other, potentially outdated solutions include a JS-based one for any OS, an OSX-only solution, and a Linux-only solution (confirmed to work in Chrome 68).
chrome://flags
in the address bar.Password import
and Password export
, and restart Chrome Canary.chrome://settings/passwords
where you should see a three dot icon. Clicking it will show the IMPORT and EXPORT options:Update: in more recent Canary versions instead of the Import/Export buttons there is a single three dot button that contains an Export option.
Note: As of chrome v60+ the method described below does not work anymore.
An OS-independent way to extract the Chrome passwords to a human/spreadsheet readable format is via the Chrome Javascript API, as described on this page:
PasswordManager is not defined
):
var out = [];
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
console.log(model);
var pl = pm.savedPasswordsList_;
for (var i = 0; i < model.length; i++) {
PasswordManager.requestShowPassword(i);
}
alert('After you press Ok results should appear in ~5 seconds.\n' +
"If password fields are empty, try increasing the timeout in the last line," +
" i.e. set to 10000 for 10 seconds");
setTimeout(
function () {
out.push('# Generated by Password Exporter; Export format 1.1; Encrypted: false');
out.push('"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"');
for (var i = 0; i < model.length; i++) {
var record = model.array_[i];
var user = record.username;
var item = pl.getListItemByIndex(i);
var pass = item.querySelector('div.password input').value;
var proto = record.url.split('://')[0];
var line = `"${proto}://${record.shownOrigin}", "${user}", "${pass}", "${record.url}", ," "," "," "`;
out.push(line);
console.log(line);
}
document.body.innerText = out.join('\n');
}, 5000);
IMPORTANT: This code is for versions of Chrome starting with v50. For earlier versions use the code linked in the original github page.
The passwords should appear on the same page in CSV format. Select and copy the output to a text file with .CSV
extension — it can be opened in Excel/Libreoffice Calc. The format is compatible with Firefox Password Exporter, and can be used to import the passwords into Firefox.
Recent versions of Google Chrome/Chromium for OSX store passwords in the system keychain, which means that Chrome uses the OSX built-in credential storage mechanism (this is already outdated info).
On OSX you can export the passwords by running this in the terminal:
sudo security dump-keychain -d login.keychain > keychain.txt
And yes, you'll need to click Allow All as many times as you have domains in your login keychain, unless you use an autoclicker script. The link also points to a ruby script for converting the generated password file to CSV. The Ruby script worked for me after I removed the line containing proto.gsub!('htps', 'https');
.
Alternatively you can use the native OSX app Keychain Access (type the name in Spotlight).
NOTE: As indicated by oarfish, Chrome stopped using the OSX Keychain as of v.45.
This solution still works in current versions of chrome (v68)
The recipe below is a Linux-only solution and was taken from this blog post I created a while ago. To export your passwords to a CSV spreadsheet that can be opened in LibreOffice or Excel:
Start Chrome/Chromium using one of the command line below. This will launch Chrome with a custom profile folder without affecting your current chrome profile.
## for Chrome:
google-chrome --user-data-dir=/tmp/chrome-tmp --password-store=basic
## for Chromium:
chromium --user-data-dir=/tmp/chrome-tmp --password-store=basic
Setup Google Synching for the new temporary profile and wait until everything is synced from the cloud, i.e. your bookmarks appear, extensions show up, the theme is applied, etc. Verify that the passwords are restored from the Google cloud by looking under Settings → Personal Stuff → Manage Saved Passwords. If they do not appear, then wait a couple of minutes more. Note: To access the stored passwords page open settings and password
in the Search box in the top right, the the Manage passwords will appear at the bottom of the page. You can also use the direct link chrome://settings/passwords
.
Exit Chrome.
Next, open a terminal and cd
to the newly created Chrome profile:
cd /tmp/chrome-tmp/Default
Now, open the Login Data
database file using the sqlite3 command line utility and dump the logins table. For this to work, you need to have sqlite3
installed on your system (in most Linuces comes pre-installed or is available in the repos).
sqlite3 'Login Data'
Next, at the SQLite prompt enter the commands below. For help on available commands type .help
at the prompt.
.mode csv # other options are `html', `tabs', etc.
.headers on
.separator ","
.output chrome_passwords.csv
select * from logins;
.exit
Now you should have a file named chrome_passwords.csv
containing all your Chrome passwords. To open it with LibreOffice, type:
libreoffice --calc chrome_passwords.csv
The Login Data
file can be opened directly with a SQLite GUI app, such sqlitebrowser, sqliteman or sqlitestudio, of which the first two are normally available in Linux repos.
this does not work on version 38+ – confiq – 2014-10-12T12:59:51.370
@ccpizza: guess --password-store is useded to prevent passwords be encrypt but stiil it doesn't work. Ok. Can you be more specific about Keychain Access. What is it? Is there a way to not copy all data across computers and just export passes? – Vladimir Shmidt – 2014-11-04T10:30:11.803
Sorry it doesn't work in windows version – Vladimir Shmidt – 2014-11-04T10:49:08.927
@VladimirShmidt: If you are on OSX type Keychain Access
in the spotlight search - it is built-in OSX app. – ccpizza – 2014-11-05T10:36:04.463
You've save my day @ccpizza. It works in Freya 0.3.1 :* (nohomo) – Fery Wardiyanto – 2015-09-13T07:22:31.897
1@confiq: the steps do work in version 47 on Ubuntu, and I would assume that it works in earlier versions too. – ccpizza – 2015-12-23T22:14:28.960
1
Note: As of 45, Chrome does not use the Keychain anymore. https://bugs.chromium.org/p/chromium/issues/detail?id=466638
– oarfish – 2016-07-08T13:19:18.3732
Just exported everything using this post https://productforums.google.com/d/msg/chrome/99KZmH2DRrA/5l37AibyAwAJ Worked like a charm, only there is no export button: find the three vertical dots next to the 'Saved Password' heading, then you will find 'export' @ccpizza: perhaps update the answer?
– Peter Versnee – 2017-11-21T20:15:39.8171
@ccpizza, there is a new JS solution that works with Chrome 63+: https://gist.github.com/ryanpcmcquen/cee082bff514f8849a29c409fe3571ff
– ryanpcmcquen – 2018-01-04T19:38:47.493On Windows, it appears the Canary functionality is now live on the main builds. I don't believe any chrome://flags are required for this. Update your answer (I'd have done it, but it'd be a pretty big change, and I haven't tested Linux and don't own a Mac) and I'll delete mine. – Mathieu K. – 2019-03-11T06:51:46.393
Doesn't work for me on OS X with Chrome 34. I get empty passwords in the resulting file. – mgol – 2014-04-11T19:26:33.933
1@m_gol: On OSX Chrome stores passwords in the keychain, and the --password-store=...
arg has no effect. Login Data
is still used but only for the metadata that does not fit into the keychain. So, if you want to see your passwords, type Keychain Access in spotlight. To migrate your passwords to another OSX system you'll need to copy both ~/Library/Keychains/login.keychain
and your chrome profile ~/Library/Application Support/Google/Chrome/<__YOUR_PROFILE_FOLDER__>
. If you only have a single chrome profile then the profile folder will be called Default
. – ccpizza – 2014-04-12T15:36:38.487
7
ChromePass looks like the tool you want. There are options to save out to HTML and plaintext, both of which are very easy to print.
Chrome gives a warning when trying to download the *.exe. Is this download okay? – Allman – 2014-09-17T09:09:47.967
It seems solid. I tried it and although Windows Defender thought it was malware, I haven't seen any changes made to my system. – Jedidja – 2015-04-10T13:19:14.680
5"I haven't seen any changes made to my system." that doesn't mean anything! Most programs (all?) do changes you don't notice, and many do things you never notice. – Filip Haglund – 2016-01-10T01:03:21.300
4
Found the easiest solution here: https://www.axllent.org/docs/view/export-chrome-passwords/
As of July/August 2016 Google introduced a hidden feature that allows you to import & export your passwords. All you currently need to do is turn on the hidden feature in the chrome://flags
settings and restart your browser, after which you'll have the required functionality.
chrome://flags/#password-import-export
, and then enable the feature.chrome://settings/passwords
(you may have to wait a little while for your passwords to sync), then scroll down to below your passwords and you'll see two new buttons, Import & Export.So simple.. I'm surprised this isn't the most popular answer. – Kris – 2017-06-29T17:23:32.177
Even with the flag, I don't see an import / export button as described. This might have been removed altogether now that passwords are accessible at http://passwords.google.com .. though that page doesn't have the options either.
– CopyJosh – 2017-07-26T16:27:43.560Currently running Chromium 59.0.3071.109 on Ubuntu 16.04, I still have the option available. – Emilien – 2017-07-27T20:39:40.340
This no longer works as of the latest version of Chrome (Feb '19). – SamAndrew81 – 2019-02-27T22:19:24.293
2
Running Chromium version 73.0.3683.75 on Ubuntu 16.04 (64 bits), I confirm that the #password-import-export feature is not there any longer, there seems to only be an Import feature left: chrome://flags/#PasswordImport (which is not what we want here). This page https://productforums.google.com/forum/#%21topic/chrome/99KZmH2DRrA confirms the option disapeared, but indicates "In chrome://settings/passwords, click the 3-dot menu icon to choose Import and Export." (I don't seem to have a 3-dot menu icon though... But maybe because I don't have any passwords saved in Chromium anymore?) FWIW...
– Emilien – 2019-03-28T21:32:30.4632
The other password export methods are fairly involved; for this reason, I wrote a simple javascript snippet to take care of the job.
simple script to export chrome passwords, run when the password manager is open from the chrome console (hit f12 to access the console) in frame settings( passwords )
out="";out2="";dat=document.getElementsByClassName("password");
for(i=0;i<dat.length;i++){x=dat[i].parentNode;
out+="\n"+x.childNodes[0].innerText+"|"+x.childNodes[1].innerText+"|"+x.childNodes[2].childNodes[0].value;
out2+="br/>"+x.childNodes[0].innerText+"|"+x.childNodes[1].innerText+"|"+x.childNodes[2].childNodes[0].value;};console.log(out);
document.write(out2)
1This does NOT work as of Chrome 37. Looks like any sort of dom element getting api returns null on that page :( – Ed Orsi – 2014-09-23T08:56:57.973
@EdOrsi You need to select the right frame (as alog already mentions in his answer) – Stijn de Witt – 2015-05-29T09:15:50.533
@alog Thank you very much this answer really helped me! – Stijn de Witt – 2015-05-29T09:29:04.810
1
As at the end of ccpizza's answer,
chrome://settings/passwords
.It seems the Chrome Canary functionality that ccpizza mentions is now live on normal Chrome. (I'm currently at Version 72, on Windows.)
0
Working from alog's answer i found that the most recent versions of chrome will only output url and username due to the requirement to enter your windows password to view a password. you can still use the snippet but only after clicking and entering your windows password for every entry in the list.
so i created a jquery snippet for more recent versions of chrome to get around this.
As before enter developer mode (f12) whilst viewing your password manager in chrome. Make sure the frame is set to settings( password ) , usually on the top left of the console view.
Go Here - Jquery 2.1.4 and copy/paste the jquery code into console, press enter.
Now you can paste the code below into the console and it will list your passwords there. You can then paste into excel and use the text to columns (first result on google) delimiter function. (dont forget to set your delimiter in the code & match in excel.)
var out = '', delim = "|";
$.each($('.password input'), function(){
if($(this).hasClass('inactive-password')) $(this).next('button').click();
var C = $(this).closest('div[role=listitem]'),
D = C.find('.url').text(),
U = C.find('.name').text(),
P = $(this).val();
out += D + delim + U + delim + P +"\n";
});
console.log(out);
You will still need to enter your windows password but it should only be once. Also remember to check that all the passwords have turned to passwords as some can be missed.If it fails first time please try rerunning the code (arrow up then enter) as jquery may pull the value before chrome enters the password into the input.
Hope it helps someone, Apologies for the jQuery - was purely for my own convenience.
And of course if you lose your passwords because of this script (not that this should) then ... your own actions ... not intended ... blah etc
UPDATE
as ccpizza states the above code has stopped working so here is an update for those who still wish to do theirs simply:
var out = '', delim = "|";
$.each($('.password input'), function(){
if($(this).attr('type') == 'password' ) $(this).next('button').click();
var C = $(this).closest('div[role=listitem]'),
D = C.find('.url a').attr('href'),
U = C.find('.name input').val(),
P = $(this).val();
out += D + delim + U + delim + P +"\n";
});
console.log(out);
UPDATE 2
also should mention if you are accessing the settings frame by chrome://settings/passwords
you will need to select the frame first. Alternatively you can use: chrome://settings-frame/passwords
which should allow direct access.
this doesn't work in latest chrome versions, e.g. 51.0.2704.84 — only login names are listed. – ccpizza – 2016-06-12T11:14:58.840
0
chrome://flags/#password-import-export
page (paste into address bar).Go to chrome://settings/passwords
, you should see the Export button.
Alternatively run this script in DevTools Console (JS):
chrome.passwordsPrivate.exportPasswords();
Export into CSV and verify the content of it.
Note: If CSV file is empty, check this Issue 808233.
Related: Google Chrome: Import/Export Passwords?
Projects: megmage/chrome-export-passwords
, ChromePass.
Gists: Grogs/step4.js
, codekoala/export_chrome_passwords.js
.
0
Install Dashlane (a password manager app) where you can automatically import all Google-stored passwords (it should ask on startup), then using the application you can export them into archive file (such as CSV or Excel format).
The functionality appears to be built into chrome://settings/passwords now. See my answer, or, if it gets updated, ccpizza's. – Mathieu K. – 2019-03-11T06:53:32.143
Related: How to download/export own passwords stored at Google Passwords?
– kenorb – 2019-06-21T22:13:51.560