Skip to main content

Mask Credit Card

This function masks valid credit card numbers. The output value is a valid credit card number.
This function:
  • masks all digits and
  • generates the last digit using the Luhn algorithm.

Two methods are available: FF1 with AES and FF1 with SHA-2. This function requires no alphabet and no extra parameter.

In the following example, the Keep format check box is selected to preserve the space from the input value.

Credit card number Method Example of masked value

4570 5624 6978 6793

FF1 with AES

4931 3744 4754 2072


FF1 with AES



FF1 with SHA-2



FF1 with SHA-2


0123 4567 8987 6543 210 FF1 with AES null

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!