Home / Internet / View Hidden Passwords Behind Asterisks

View Hidden Passwords Behind Asterisks

While entering the password for any login page or web page, the passwords are masked as asterisk so that people around you can’t view the password your entered. Most of the time, users want to view the hidden password behind asterisks to ensure that they have entered the right password on the login screen. There are many such freeware software available, but it could be very risky to use such unknown software. Therefore, we usually use the below JavaScript code whenever needed. It requires no installation, is safe, and very easy to use.

This simple JavaScript code displays the hidden asterisk password character on the screen. You just need to copy the script and paste it into the browser’s address bar. The script is tested on Firefox, IE, Opera, Safari & Google Chrome.

Reveal Hidden Asterisk Password

View Hidden Passwords Behind Asterisks

Please copy the below code and paste it into your browser’s address bar to view the hidden password on that page. By default, when you paste the below code in the address bar, the browser will remove the javascript tag from the start of the code, so please add “javascript:” and then press Enter.

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;}}

You can just drag it below to your bookmark toolbar to make it simpler and easier for you. When you need to view the hidden password, click on the toolbar button.

Add bookmark button to Toolbar

Add password revealerDrag this link to your bookmarks toolbar
Create a new bookmark by adding the above javascript code and give any name for the bookmark as you wish, e.g. Show Password.

Reveal Hidden Asterisk Password Javascript to Bookmark

This trick comes very handy for people who often make mistakes while entering or forgetting the password.

About Roshan Karkera

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.


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

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

  3. It will not work with old browser

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

  5. @ 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.

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

  7. code not working in firefox…

    •  @c28a340dcf91e0a2fe146c101e1c86fe:disqus

      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.

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

Leave a Reply

Your email address will not be published.