10 Best Input Mask Plugins In JavaScript (2021 Update)

by jQueryScript,

When you're creating a user-friendly HTML form on email subscription, sign up, or payment page to engage users and to improve conversion rate you might need an input mask plugin to simplity the task.

What Is Input Mask?

Suppose when you entered a phone number (e.g. +1 222-333-4444) in the input field, you would like the field to auto format the characters in '+1 NXX-NXX-XXXX' format while typing. The input mask plugin is designed for this purpose. 

The Best Input Mask Plugin

In this blog post, you will find the 10 best jQuery & Vanilla JavaScript plugins for currency/date/time/phone input fields to restrict user input to a specific pattern and mask data entry in a specific format while typing. Have fun with it.

Originally Published Jan 21 2020, updated Apr 7 2021

Table of contents:

Best jQuery Input Mask Plugins:

Easy JavaScript/jQuery Input Mask Plugin - inputmask

jQuery Input Mask is a lightweight and easy-to-use jQuery plugin that makes it easier to create an input mask.

Easy JavaScript/jQuery Input Mask Plugin - inputmask

[Demo] [Download]


Lightweight jQuery Input Mask Plugin For Phone Numbers

This is a lightweight and easy-to-use jQuery input mask plugin to mask and validate US (or international) phone numbers in standard input fields.

Lightweight jQuery Input Mask Plugin For Phone Numbers

[Demo] [Download]


jQuery Plugin For Number Input Formatting - Mask Number

Mask Number is a small jQuery plugin that automatically restricts, masks and formats decimal / integer numbers numbers in a specific pattern as you type on input fields.

jQuery Plugin For Number Input Formatting - Mask Number

[Demo] [Download]


jQuery Currency Input Filed Mask Plugin - maskmoney

maskmoney is a super simple jQuery plugin that make it easy to mask input filed text in the form of currency.

jQuery Currency Input Filed Mask Plugin - maskmoney

[Demo] [Download]


Simple Input Mask & Validation Plugin With jQuery - maskedinput

maskedinput is a simple yet fully configurable jQuery input mask plugin that allows the user to type characters in fixed position in a certain format.

Simple Input Mask & Validation Plugin With jQuery - maskedinput

[Demo] [Download]


Best Vanilla JavaScript Input Mask Plugins:

Basic Phone Input Mask With Pure JavaScript – phone-mask

A really simple JavaScript plugin to make custom masks on phone inputs.

Basic Phone Input Mask With Pure JavaScript – phone-mask

[Demo] [Download]


Money(Currency) Mask Library In Vanilla JavaScript – SimpleMaskMoney

A vanilla JavaScript input mask library that masks data entry in an input field in the form of money.

Money(Currency) Mask Library In Vanilla JavaScript – SimpleMaskMoney

[Demo] [Download]


Lightweight Pure JavaScript Input Mask

A pure JavaScript library to make masks on input fields for better number entering like phone number, SSN, date & time , etc.

Lightweight Pure JavaScript Input Mask

[Demo] [Download]


Feature-rich Input Mask Plugin With Vanilla JavaScript – imaskjs

A vanilla JavaScript input mask plugin that enables the user to enter the data in a certain format.

Feature-rich Input Mask Plugin With Vanilla JavaScript – imaskjs

[Demo] [Download]


Easy Input Mask Component In Vanilla JavaScript & Vue.js – Maska

A small and customizable input mask component for Vanilla JavaScript and Vue.js framework.

Easy Input Mask Component In Vanilla JavaScript & Vue.js – Maska

[Demo] [Download]


Conclusion:

Want more jQuery plugins or JavaScript libraries to create awesome Input Mask on the web & mobile? Check out the jQuery Input Mask and JavaScript Input Mask sections.