Skip to main content

Social Security Number (SSN) generation functions

You can generate valid French, German, Japanese, UK, US, Chinese, and Indian Social Security Numbers, regardless of the input value.

To mask SSNs by using the Format-Preserving Encryption, use the Social Security Number (SSN) masking functions.

The following table lists the SSN generation functions and which type of generation they use.

List of the SSN generation functions and which type of generation they use.
Function Random generation Consistent generation Bijective generation Input data validation
Generate French SSN number Yes No No No
Generate German SSN number Yes No No No
Generate Japanese SSN number Yes No No No
Generate UK SSN number Yes No No No
Generate US SSN number Yes No No No
Generate Chinese SSN number Yes No No No
Generate Indian SSN number Yes No No No

These functions only apply on Strings.

The following table shows examples of masked values depending on the function.

SSN generation function Input value Example of a masked value
Generate French SSN number A26 2760774865895 37
Generate German SSN number A26 96918234144
Generate Japanese SSN number A26 680917875625
Generate UK SSN number A26 BY 15 61 20 D
Generate US SSN number A26 437-02-2223
Generate Chinese SSN number A26 653024204001080102
Generate Indian SSN number A26 142543864863

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 – please let us know!