Credit card number formatting
Phone number formatting
Also supports Custom options
It is quite awesome. Have a look and let me know if you any other solution for the same.
You can check it out Demo in action at: https://nosir.github.io/cleave.js/