In this article I will explain with an example, how to show hide Password using EYE Icon in TextBox with jQuery.
The EYE Icon will be created using Font-Awesome Fonts and will be displayed next to TextBox.
When the EYE Icon is clicked, the TextBox will be toggled from Password TextBox to a Normal TextBox and vice versa respectively showing and hiding the Password Text.
Showing Hiding Password with EYE Icon in TextBox using jQuery
The HTML Markup consists of a Password TextBox and an HTML SPAN which has been assigned with Font-Awesome EYE Icon CSS class.
The EYE Icon HTML SPAN has been assigned with a jQuery Click event handler.
When the EYE Icon is clicked, the CSS class is toggled as well as the TextBox is toggled between a Normal TextBox and a Password TextBox by setting the Type attribute value.
<html xmlns="">
    <style type="text/css">
        input, input[type=password]
            width: 150px;
            height: 20px;
            cursor: pointer;
    <script src=""></script>
    <link href=""
        rel="stylesheet" type="text/css" />
    <input type="password" id="txtPassword" />
    <span id="toggle_pwd" class="fa fa-fw fa-eye field_icon"></span>
    <script type="text/javascript">
        $(function () {
            $("#toggle_pwd").click(function () {
                $(this).toggleClass("fa-eye fa-eye-slash");
               var type = $(this).hasClass("fa-eye-slash") ? "text" : "password";
                $("#txtPassword").attr("type", type);
jQuery: Show Hide Password with EYE Icon in TextBox
Browser Compatibility

The above code has been tested in the following browsers.

Internet Explorer  FireFox  Chrome  Safari  Opera 

* All browser logos displayed above are property of their respective owners.