Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

View hidden web passwords Web Browsers
Have you used your keychain to store your passwords? Do you wish there was an easy way to see what the password for a specific site is? Here are two different ways to accomplish this task without leaving your browser!

Both of these methods utilize the same functionality: they change the type of text box a password is entered into from a "password" box (masked with asterisks or ) to a "text" box, displaying its contents.

The first method can be done in Safari or Chrome (since they're both WebKit). Right-click or Control-click on the masked password field and select Inspect Element. Within the Inspector, you'll find the input HTML tag is highlighted. One of the attributes there will be type="password". Simply clicking on password will allow you to change it; type in text and, without closing the Inspector window, look at the password field to see your password revealed.

The second method is even easier, and does what is described above, just using Javascript. Drag the text below to your Bookmarks bar or menu. Whenever you're on a page with a password field whose text is hidden, click on it or select it to reveal the password.

javascript:var%20els%20=%20document.getElementsByTagName('input');%20for(var%20x=0;%20x%3Cels.length;%20x++)%7B%20if(els%5Bx%5D.type.toLowerCase()%20==%20'password'%20)%7B%20var%20test%20=%20els%5Bx%5D.type%20=%20'text';%7D%7D
[kirkmc adds: A couple of points. First, you can find your passwords in Safari 6's Passwords preferences. Check Show Passwords, and enter your user account password, and the'll all display. However, sometimes you're on a website where you have several logins, and it can be useful to see which one is getting entered by the keychain.

Second, bear in mind the security risk here. Assume you add this bookmarklet to your Safari bookmarks toolbar; anyone who comes to your computer could eventually click on it if they're on a page where your keychain has entered a password. Of course, they'd already have access to the page, if your keychain was unlocked, but them seeing the password could be more serious, if you tend to use the same password on multiple sites.]
    •    
  • Currently 2.61 / 5
  You rated: 4 / 5 (28 votes cast)
 
[22,282 views]  

View hidden web passwords | 8 comments | Create New Account
Click here to return to the 'View hidden web passwords' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recover hidden web passwords
Authored by: redfood on Oct 05, '12 08:23:41AM

There are Safari (and Chrome) extensions that do this too (with even less fuss). Try ShowPass.

(Also recover is an odd word to use in the title because it implies the password was lost. Maybe "view" would be more appropriate).



[ Reply to This | # ]
Recover hidden web passwords
Authored by: Lri on Oct 05, '12 08:48:49AM

If a keychain has been unlocked, people using your computer can see your passwords anyway with something like security find-generic-password -l AppleID -w.

It's an additional security risk if it would allow scripts or browser extensions to see them as well. Could you write a script that opens https://accounts.google.com/Logout (which redirects to a login page), modifies the password field, and copies the password?



[ Reply to This | # ]
Recover hidden web passwords
Authored by: TGV on Oct 05, '12 10:22:38PM

The point of the warning is twofold:
1. be aware that your passwords are not safe, even if all you see is
2. entering commands in the terminal and interpreting the output is for a determined few, who don't need this, indeed. But careless use of this simple trick will show your passwords to the entire world, pranksters included.



[ Reply to This | # ]
View hidden web passwords
Authored by: smiliek on Oct 05, '12 09:10:34AM

I use this bookmarklet for years now. Almost works the same as the one you have listed above, but has dialogs.

javascript:
<code>(function()%7Bvar%20s,F,j,f,i;%20s%20=%20%22%22;%20F%20=%20document.forms;%20for(j=0;%20j%3CF.length;%20++j)%20%7B%20f%20=%20F%5Bj%5D;%20for%20(i=0;%20i%3Cf.length;%20++i)%20%7B%20if%20(f%5Bi%5D.type.toLowerCase()%20==%20%22password%22)%20s%20+=%20f%5Bi%5D.value%20+%20%22%5Cn%22;%20%7D%20%7D%20if%20(s)%20alert(%22Passwords%20in%20forms%20on%20this%20page:%5Cn%5Cn%22%20+%20s);%20else%20alert(%22There%20are%20no%20passwords%20in%20forms%20on%20this%20page.%22);%7D)();
</code>

It pops up a nice dialog warning you if it can't find one on the page.

K :)



[ Reply to This | # ]
View hidden web passwords
Authored by: Hypnoman on Oct 08, '12 01:22:53AM

The first method doesn't work for me. There's no "Show Elements" in the contextual menu. Am I doing something wrong?



[ Reply to This | # ]
View hidden web passwords
Authored by: Lri on Oct 10, '12 04:58:29PM

You have to enable the develop menu in the advanced preferences.



[ Reply to This | # ]
View hidden web passwords
Authored by: NorthboundTrain on Oct 08, '12 05:00:02AM

Consider, instead, using a password manager such as LastPass (http://www.lastpass.com).



[ Reply to This | # ]
View hidden web passwords
Authored by: BiL Castine on Oct 08, '12 07:08:34AM
While I do use a password manager (1Password), I also find the free ShowPass Safari extension to be very helpful when I do need to view passwords. It stays out of the way and only shows passwords when your pointer hovers over the password field.

[ Reply to This | # ]