# maska

> Simple zero-dependency input mask for Vanilla JS, Vue, Alpine.js and Svelte

Latest version **3.2.1** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install maska
pnpm add maska
yarn add maska
bun add maska
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.2.1 |
| Published | 2026-09-02 |
| First published | 2019-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 56.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2016 |
| Author | Alexander Shabunevich |
| Maintainers | beholdr |
| Keywords | mask, inputmask, alpinejs, svelte, vue |

## Links

- npm: https://www.npmjs.com/package/maska
- Repository: https://github.com/beholdr/maska
- Homepage: https://beholdr.github.io/maska/
- Issues: https://github.com/beholdr/maska/issues
- npm.io page: https://npm.io/package/maska

## Recent versions

- 3.2.1 (latest) — 2026-09-02
- 2.1.11 (stable-v2) — 2024-01-10
- 1.5.2 (stable-v1) — 2022-12-07
- 3.2.0 — 2025-07-02
- 3.1.1 — 2025-03-22
- 3.1.0 — 2025-02-01
- 3.0.4 — 2024-11-28
- 3.0.3 — 2024-10-04
- 3.0.2 — 2024-08-26
- 3.0.1 — 2024-08-23
- 3.0.0 — 2024-07-14
- 3.0.0-beta5 — 2024-07-07
- 3.0.0-beta4 — 2024-06-12
- 3.0.0-beta3 — 2024-06-11
- 3.0.0-beta2 — 2024-06-07
- … 40 more at https://npm.io/package/maska/versions

## README

<p align="center">
  <a href="https://beholdr.github.io/maska/"><img src="https://beholdr.github.io/maska/maska.svg"></a>
</p>

<p align="center">
  Simple zero-dependency input mask.
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/maska"><img src="https://img.shields.io/npm/v/maska"></a>
  <a href="https://bundlephobia.com/package/maska"><img src="https://img.shields.io/bundlephobia/minzip/maska"></a>
  <a href="https://github.com/beholdr/maska/actions/workflows/build.yml"><img src="https://github.com/beholdr/maska/actions/workflows/build.yml/badge.svg"></a>
</p>

<h3 align="center">
  <a href="https://beholdr.github.io/maska/"><b>Documentation & demo</b></a>
</h3>

# Maska

## Support ☕️

> ❤️ [Please support](https://boosty.to/beholdr) Maska development!

## Features ✨

- No dependencies and small size: ~3 Kb gziped
- Vanilla JS version + Vue 2/3, Alpine.js and Svelte integrations
- Works with native and custom inputs
- Custom tokens with modifiers, transform functions and hooks
- Number mask mode: easy money formatting
- Dynamic, reversed and eager masks

## What’s new in v3 🎉

- Integrations with Alpine.js and Svelte
- Number mask mode
- Simplified directive format
- Other small improvements and fixes

## Source of Inspiration 💡

- [vue-the-mask](https://vuejs-tips.github.io/vue-the-mask/)
- [jQuery Mask Plugin](http://igorescobar.github.io/jQuery-Mask-Plugin/)

## License 📄

[MIT](LICENSE.txt)

---
_Source: https://npm.io/package/maska · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
