web analytics
Home / Internet / Reveal Hidden Asterisk Password in Firefox & IE

Reveal Hidden Asterisk Password in Firefox & IE

While entering password for any login page or web page, the password are masked as asterisk so that people around you can’t view the password your entered. In some scenario, some home user might want to view the asterisk password to make sure that they have entered the right password in the login screen. There are many freeware software available for the same but could be a risk to use any of the unknown software. So, I came out with this JavaScript code, which require no installation, safe and very ease to use.
9-5-2010 8-17-45 PM
This is simple JavaScript code which display the hidden asterisk password character on the screen. You just need to copy the script and paste on the address bar of the browser. The Script is tested on Firefox, IE, Opera, Safari & Google Chrome.

Copy the below code and paste in the address bar of your browser to view hidden password on that page.

javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert(‘There are no passwords found in forms on this page.’);}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s=”;if (ej.type==’password’){s=ej.value;if (s!=”){alert(‘Password found on this page:\n\n’ +s)}else{alert(‘Password is blank’)}return true;}}

To make it more simple you can add it as a button on Firefox bookmark toolbar as bookmarklet, so when you need to reveal any hidden password simply click the button on the toolbar.

How to add bookmarklet button on Firefox Toolbar

Add password revealerDrag this link to your bookmarks toolbar
Right-click on Firefox toolbar and choose New Bookmark. Add the above code to the location box of the bookmark and Give any name for the bookmark as you wish, e.g. Show Password. Now, Click on Add and now you may see a new button on the toolbar.


This comes very handy for people who often makes mistake while entering the password or who forgets password. Some bad people out there will definitely be thinking this to be used as to reveal others password.

About Kroshan

Roshan Karkera a.k.a. k.roshan. Blogger by passion and software engineer by profession. He believes in sharing knowledge, which made him to start his own blog. He is very much keen & passionate about new technology & Science. If you'd like to connect with him, follow at Google plus or Twitter.
  • Robin

    this trick is awesome. I added to my chrome and works great.

  • Seseh

    Id didnt work when i try in IE 6.0
    no effect when i put in address bar…

  • Dj roshan

    It will not work with old browser

  • mehul gavit

    awesome trick.
    but, doesn't work in internet explorer. (ie8, ie9)

  • K.roshan

    @ mehul, I never tested on IE 8 and 9. However this code is not working for IE 8 and 9. I will get a fix for IE soon if possible.

  • Very nice, i suggest webmaster can set up a forum, so that we can talk and communicate.

  • Unknown

    code not working in firefox…

    • kroshan


      In Firefox 11 and later versions, the code is not
      working, due to some security measures. Firefox will not respond to this
      JavaScript code. Alternatively, you can use Firefox console, Press Ctrl + Alt + K and paste the code and press Enter.

  • sidhannowe

    Not related to your blog post but which tool do you used to make your screencast ?