Spec-Zone.ru › CSS

`-webkit-text-security` CSS property

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

-webkit-text-security is a non-standard CSS property that obfuscates characters in a <form> field (such as <input> or <textarea>) by replacing them with a shape. It only affects fields that are not of type=password.

Syntax

-webkit-text-security: circle;
-webkit-text-security: disc;
-webkit-text-security: square;
-webkit-text-security: none;

/* Global values */
-webkit-text-security: inherit;
-webkit-text-security: initial;
-webkit-text-security: revert;
-webkit-text-security: revert-layer;
-webkit-text-security: unset;

Formal syntax

-webkit-text-security = circle | disc | square | none

Examples

Obscuring a text input

Try typing in the field below. If your browser supports this property, the characters should be visually replaced with squares.

HTML

<label for="name">Name:</label> <input type="text" name="name" id="name" />

CSS

input {
  -webkit-text-security: square;
}

Result

Specifications

Not part of any standard.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on iOS Samsung Internet WebView Android WebView on iOS
-webkit-text-security
1
79
114
15
3
18
114
14
1
1.0
4.4
1

See also

  • WebKit CSS extensions

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-text-security

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API