Create custom JotForm Input Masks for Short Fields

Guide to Jotform Input Masks

The simple "Short Text" field type in JotForm is way more capable than you'd guess. Here is a breakdown of how to create your own custom Jotform Input Masks, along with some common examples.

  • Intro to Short Text Field Input Masks in JotForm

    Screenshot of the JotForm Input Mask area in a Short Text Field's settings panel.

    Introduction

    The custom input mask is available only on Short Text fields in JotForm. These instructions cover how to get the most out of the Short Field input mask feature. It is a limited solution; if it doesn't meet your needs, consider using the Masked Input widget instead.


    Location

    1. Add a Short Text Field to your JotForm.
    2. Click the field's gear icon to open the Short Text Properties panel.
    3. Click the Options tab.
    4. The Input Mask area is at the bottom of this panel.
  • How to create a custom Input Mask

    How to create a custom input mask

    Use a combination of the following characters to make a pattern that the user has to match, to submit your form. You can combine required and optional characters with static characters (e.g., the slashes in a date, or the dashes in a phone number).


    Required characters:

    = Permits one required alphabetical character (a-z, A-Z)

    # = Permits one required numerical character (0-9)

    * = Permits one required alphanumeric character (letters OR numbers permitted)


    Adding brackets makes a character optional:

    [@] = Permits one optional alphabetical character (a-z, A-Z)

    [#] = Permits one optional numerical character (0-9)

    [*] = Permits one optional alphanumeric character (letters OR numbers permitted)


    Note: You cannot use @, #, or * for their actual literal meanings. They are only placeholders. If you need to create a pattern that uses one of these characters, consider using a pre-made field (for instance, using the email field to validate email patterns that include the @ symbol), or use the Masked Input widget.


    Supported static special characters*:

    • >, -, /, +, spaces, left and right parentheses, periods
    • a-z, A-Z, and 0-9 also work as static symbols

    Unsupported static special characters*:

    • @, #, *, <, [, ]

    *These are characters I have personally tested as static elements in a pattern. This is not an exhaustive list.

  • Sample custom Input Masks

    Here are some sample input mask patterns to get you going:

    • Canadian postal code: @#@ #@#
    • Employee number: EMP-#######
    • US phone: (###) ###-####
    • US phone: ###-###-####
    • US phone with international country code: +## ###-###-####
    • US phone with optional four-digit extension: ###-###-#### [x####]
    • Alternative US phone with optional four-digit extension: (###) ###-#### [ext ####]
    • Serial number: AA-####-***
    • Social Security number: ###-##-####
    • US Zip code with optional +4 digits: #####[-####]

    Note: These only validate the pattern, but not whether it is a valid entry.


    For example, you could use the date pattern ##/##/#### hoping for a birthdate, and someone could enter 13/13/3000 and it would satisfy the pattern while also definitely NOT being someone's real birthday. ;)

  • If these don't work, use the Masked Input widget

    I'm working on a guide for this option, next! Coming soon :)

  • Learn more at Jotform.com

    Another great reference is JotForm's own guide to the Input Mask:

    https://www.jotform.com/help/381-Getting-Started-with-the-basics-of-Input-Masking/

Last updated June 10, 2025.