Skip to content
This repository

A jQuery Plugin to make masks on form fields and HTML elements.

jQuery Mask Plugin

A jQuery Plugin to make masks on form fields and HTML elements.

Build Status Code Climate Total views

Live Demostration & Usage Examples


  • Lightweight (~2kb minified, ~1kb gziped).
  • Masks on any HTML element (no need to server-side mask anymore!)!
  • data-mask attribute support.
  • String/Numeric/Alpha/Mixed masks.
  • Reverse mask support for masks on numeric fields.
  • Sanitization.
  • Optional digits.
  • Recursive Digits.
  • Automatic maxlength.
  • Advanced mask initialization.
  • Callbacks.
  • On-the-fly mask change.
  • Mask removal.
  • Full customization.
  • Compatibility with Zepto.js





jQuery Mask Plugin has been tested with jQuery 1.7+ on all major browsers:

  • Firefox 2+ (Win, Mac, Linux);
  • IE7+ (Win);
  • Chrome 6+ (Win, Mac, Linux, Android, iPhone);
  • Safari 3.2+ (Win, Mac, iPhone);
  • Opera 8+ (Win, Mac, Linux, Android, iPhone).


Help us!

Click here to lend your support to: jQuery Mask Plugin and make a donation at !

Donators (Thanks!)

  • Rinaldo Morato
  • Marcelo Otowicz
  • Marcia Cristina Cava
  • Igor Lima
  • Steve Binder
  • Douglas Patrocinio
  • Paulo Diogo Rodrigues Leão
  • Dorijan Covran
  • Amaro Mariño Malvido
  • Mark Guadagna
  • Serdar Selim Tulunoğlu
  • Full list
Something went wrong with that request. Please try again.