> Markdown version of [PasswordField](https://vaadin.com/docs/v8/framework/components/components-passwordfield). Section index: [llms.txt](https://vaadin.com/docs/v8/framework/llms.txt)

# <a id="components.passwordfield"></a>PasswordField

[Demo](https://demo.vaadin.com/sampler/#ui/data-input/text-input/password-field)

The PasswordField is a variant of TextField that hides the typed input from visual inspection.

```java
PasswordField tf = new PasswordField("Keep it secret");
```

The result is shown in [PasswordField](#figure.components.passwordfield.basic).

[Image: passwordfield basic]

PasswordField

You should note that the PasswordField hides the input only from "over the shoulder" visual observation. Unless the server connection is encrypted with a secure connection, such as HTTPS, the input is transmitted in clear text and may be intercepted by anyone with low-level access to the network. Also phishing attacks that intercept the input in the browser may be possible by exploiting JavaScript execution security holes in the browser.

## <a id="components.passwordfield.css"></a>CSS Style Rules

```css
.v-textfield { }
```

The PasswordField does not have its own CSS style name but uses the same v-textfield style as the regular TextField. See ["CSS Style Rules"](https://vaadin.com/docs/v8/framework/components/components-textfield.md#components.textfield.css) for information on styling it.
