imaskjs
Vanilla JavaScript input mask library that formats values typed into input fields and returns raw and unmasked values.
imaskjs is a vanilla JavaScript input mask that applies a mask to an HTML input element and gives access to raw and unmasked values. Masks can be a regular expression, a function, a number or date format, a pattern with fixed parts and custom definitions, or a dynamic mask chosen on the fly. A pipe converts and formats values, and the library also works with web components and contenteditable elements.
Worth knowing
The guide says a mask applied to an input element needs type="text", because other input types are not supported. The repository is a monorepo that also ships packages for Vue, Angular, React, React Native, Svelte and Solid, listed in the README as plugins.
Identity
- Status
- Active
- Maintainer
- uNmAnNeR5
- Maintained by
- Individual
- First release
- 20174
Rendering and deploy
- Install with
- npm, script tag from unpkg6
Releases
Adoption
Sources
- 2026-11-16: links
imask.js.org/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/uNmAnNeR/imaskjs - 2026-11-16: links, Categories
github.com/uNmAnNeR/imaskjs/blob/master/README.md - 2026-11-16: First release
api.github.com/repos/uNmAnNeR/imaskjs/tags?per_page=100 - 2026-11-16: Maintainer, License, License model
raw.githubusercontent.com/uNmAnNeR/imaskjs/master/LICENSE - 2026-11-16: Install with
imask.js.org/guide.html - 2026-11-16: Current major version, Last release
api.github.com/repos/uNmAnNeR/imaskjs/releases - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/imask - 2026-11-16: Contributors
api.github.com/repos/uNmAnNeR/imaskjs/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/imask