{"id":31506,"date":"2018-04-21T15:47:47","date_gmt":"2018-04-21T15:47:47","guid":{"rendered":"https:\/\/ampscript.guide\/base64decode\/"},"modified":"2021-04-06T00:58:39","modified_gmt":"2021-04-06T00:58:39","slug":"base64decode","status":"publish","type":"post","link":"https:\/\/ampscript.guide\/base64decode\/","title":{"rendered":"Base64Decode"},"content":{"rendered":"<h2>Base64Decode<\/h2>\n<p>This function decodes a Base64 encoded string.<\/p>\n<h3>Arguments<\/h3>\n<p><code>Base64Decode(1,2,3)<\/code><\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center\">Ordinal<\/th>\n<th style=\"text-align: left\">Type<\/th>\n<th style=\"text-align: left\">Required<\/th>\n<th style=\"text-align: left\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center\">1<\/td>\n<td style=\"text-align: left\">String<\/td>\n<td style=\"text-align: left\">True<\/td>\n<td style=\"text-align: left\">String value to decode<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">2<\/td>\n<td style=\"text-align: left\">String<\/td>\n<td style=\"text-align: left\">False<\/td>\n<td style=\"text-align: left\">Optional .NET-supported character-encoding type to utilize in decoding (<code>ASCII<\/code>, <code>UTF-7<\/code>, <code>UTF-8<\/code>, <code>UTF-16<\/code>, and <code>UTF-32<\/code>)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">3<\/td>\n<td style=\"text-align: left\">Number<\/td>\n<td style=\"text-align: left\">False<\/td>\n<td style=\"text-align: left\">When utilized in an email message, a value of <code>1<\/code> will abort the send if the specified string cannot be successfully decoded.   A value of <code>0<\/code> will allow the send to continue.  The default value is <code>1<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<pre><code>%%[\n\nvar @str\nvar @enc\nvar @encASCII\nvar @encUTF7\nvar @encUTF8\nvar @encUTF16\nvar @encUTF32\nvar @dec\nvar @decASCII\nvar @decUTF7\nvar @decUTF8\nvar @decUTF16\nvar @decUTF32\n\nset @enc  = \"ZG91Z0BsaW1lZGFzaC5jb20=\"\nset @encASCII = \"ZG91Z0BsaW1lZGFzaC5jb20=\"\nset @encUTF7 = \"ZG91ZytBRUEtbGltZWRhc2guY29t\"\nset @encUTF8 = \"ZG91Z0BsaW1lZGFzaC5jb20=\"\nset @encUTF16 = \"ZABvAHUAZwBAAGwAaQBtAGUAZABhAHMAaAAuAGMAbwBtAA==\"\nset @encUTF32 = \"ZAAAAG8AAAB1AAAAZwAAAEAAAABsAAAAaQAAAG0AAABlAAAAZAAAAGEAAABzAAAAaAAAAC4AAABjAAAAbwAAAG0AAAA=\"\n\nset @dec = Base64Decode(@enc)\nset @decASCII = Base64Decode(@encASCII, \"ASCII\")\nset @decUTF7 = Base64Decode(@encUTF7, \"UTF-7\")\nset @decUTF8 = Base64Decode(@encUTF8, \"UTF-8\")\nset @decUTF16 = Base64Decode(@encUTF16, \"UTF-16\")\nset @decUTF32 = Base64Decode(@encUTF32, \"UTF-32\")\n\n]%%\nenc: %%=v(@enc)=%%\n&lt;br&gt;encASCII: %%=v(@encASCII)=%%\n&lt;br&gt;encUTF7: %%=v(@encUTF7)=%%\n&lt;br&gt;encUTF8: %%=v(@encUTF8)=%%\n&lt;br&gt;encUTF16: %%=v(@encUTF16)=%%\n&lt;br&gt;encUTF32: %%=v(@encUTF32)=%%\n&lt;br&gt;dec: %%=v(@dec)=%%\n&lt;br&gt;decASCII: %%=v(@decASCII)=%%\n&lt;br&gt;decUTF7: %%=v(@decUTF7)=%%\n&lt;br&gt;decUTF8: %%=v(@decUTF8)=%%\n&lt;br&gt;decUTF16: %%=v(@decUTF16)=%%\n&lt;br&gt;decUTF32: %%=v(@decUTF32)=%%<\/code><\/pre>\n<h4>Output<\/h4>\n<pre><code>enc: ZG91Z0BsaW1lZGFzaC5jb20=\nencASCII: ZG91Z0BsaW1lZGFzaC5jb20=\nencUTF7: ZG91ZytBRUEtbGltZWRhc2guY29t\nencUTF8: ZG91Z0BsaW1lZGFzaC5jb20=\nencUTF16: ZABvAHUAZwBAAGwAaQBtAGUAZABhAHMAaAAuAGMAbwBtAA==\nencUTF32: ZAAAAG8AAAB1AAAAZwAAAEAAAABsAAAAaQAAAG0AAABlAAAAZAAAAGEAAABzAAAAaAAAAC4AAABjAAAAbwAAAG0AAAA=\ndec: doug@limedash.com\ndecASCII: doug@limedash.com\ndecUTF7: doug@limedash.com\ndecUTF8: doug@limedash.com\ndecUTF16: doug@limedash.com\ndecUTF32: doug@limedash.com<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Base64Decode This function decodes a Base64 encoded string. Arguments Base64Decode(1,2,3) Ordinal Type Required Description 1 String True String value to decode 2 String False Optional .NET-supported character-encoding type to utilize in decoding (ASCII, UTF-7, UTF-8, UTF-16, and UTF-32) 3 Number False When utilized in an email message, a value of 1 will abort the send [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v14.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The AMPscript Guide - Base64Decode<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ampscript.guide\/base64decode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The AMPscript Guide - Base64Decode\" \/>\n<meta property=\"og:description\" content=\"Base64Decode This function decodes a Base64 encoded string. Arguments Base64Decode(1,2,3) Ordinal Type Required Description 1 String True String value to decode 2 String False Optional .NET-supported character-encoding type to utilize in decoding (ASCII, UTF-7, UTF-8, UTF-16, and UTF-32) 3 Number False When utilized in an email message, a value of 1 will abort the send [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ampscript.guide\/base64decode\/\" \/>\n<meta property=\"og:site_name\" content=\"The AMPscript Guide\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-21T15:47:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-06T00:58:39+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ampscript.guide\/#website\",\"url\":\"https:\/\/ampscript.guide\/\",\"name\":\"The AMPscript Guide\",\"description\":\"The Definitive Scripting Manual for Salesforce Marketing Cloud\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ampscript.guide\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/base64decode\/#webpage\",\"url\":\"https:\/\/ampscript.guide\/base64decode\/\",\"name\":\"The AMPscript Guide - Base64Decode\",\"isPartOf\":{\"@id\":\"https:\/\/ampscript.guide\/#website\"},\"datePublished\":\"2018-04-21T15:47:47+00:00\",\"dateModified\":\"2021-04-06T00:58:39+00:00\",\"author\":{\"@id\":\"https:\/\/ampscript.guide\/#\/schema\/person\/5335042f77731e84f9808aecef25daec\"},\"breadcrumb\":{\"@id\":\"https:\/\/ampscript.guide\/base64decode\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ampscript.guide\/base64decode\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ampscript.guide\/base64decode\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/\",\"url\":\"https:\/\/ampscript.guide\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/base64decode\/\",\"url\":\"https:\/\/ampscript.guide\/base64decode\/\",\"name\":\"Base64Decode\"}}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/ampscript.guide\/#\/schema\/person\/5335042f77731e84f9808aecef25daec\",\"name\":\"dev\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts\/31506"}],"collection":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/comments?post=31506"}],"version-history":[{"count":0,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts\/31506\/revisions"}],"wp:attachment":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/media?parent=31506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/categories?post=31506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/tags?post=31506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}