Add the #DF24 Developer Keynote to your agenda. Join us in-person on 9/18 at 2:30 p.m. PT or on Salesforce+ at 5 p.m. PT for the must-see session built just for developers.

MD5()

Converts a string to a 128-bit hexadecimal MD5 hash.

The MD5() function has two parameters:

  • stringToConvert (string): Required. The string to encode.
  • charSet (string): The character set to use for the encoding. The default value is UTF-8, but you can also use UTF-16 encoding.

To use this function, pass it a string.

The function outputs an MD5 hash of the provided string: 7ccb47715d465a9e6a2b7d3c0441da80

You can also generate the hash using UTF-16 encoding, as in this example.

The function outputs an MD5 hash that uses UTF-16 encoding: 3251ab3b9d54f085f6b57aa3bc134c3c