Add mask on field

Hi, a have a web form and some fields that need masks, like phone and company Id. Is there a way of add a mask to those fields?