We'd like to BASE64 Encode our Email Addresses so we can send them to an external third-party (it's the third-party's requirement). We know how to do it using AMPscript, but not in SQL.

Ultimately, we would like to create a query that pulls all the email addresses and places them into a new Data Extension as BASE64 Encoded values.

Is this possible?

  • How many records do you have to encode, and how often will this process need to be run? Is it a single batch of many thousands, or do you need a daily encode of a few hundred? – Cameron Robert Nov 2 '19 at 14:56
  • For now, it's a one-time encoding so we can export values to a third-party. There is close to 1mm rows – George Rosedale Nov 3 '19 at 16:46

You can have 2 steps in your automation to solve this:

enter image description here

1- SQL Query to Pull data into a DE

2- SSJS Script to go through the Data extension and Update an "encodedEmail" field with the new encoded email using the Base64encode() Method. (Documentation Link below)


To improve performance you can add an "If" statement to only update empty "encodedEmail".

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.