--- page_title: textdecodebase64 - Functions - Configuration Language description: >- The textdecodebase64 function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. --- ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️ > [!IMPORTANT] > **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️ # `textdecodebase64` Function -> **Note:** This function is supported only in Terraform v0.14 and later. `textdecodebase64` function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. Terraform uses the "standard" Base64 alphabet as defined in [RFC 4648 section 4](https://tools.ietf.org/html/rfc4648#section-4). The `encoding_name` argument must contain one of the encoding names or aliases recorded in [the IANA character encoding registry](https://www.iana.org/assignments/character-sets/character-sets.xhtml). Terraform supports only a subset of the registered encodings, and the encoding support may vary between Terraform versions. Terraform accepts the encoding name `UTF-8`, which will produce the same result as [`base64decode`](/terraform/language/functions/base64decode). ## Examples ``` > textdecodebase64("SABlAGwAbABvACAAVwBvAHIAbABkAA==", "UTF-16LE") Hello World ``` ## Related Functions * [`textencodebase64`](/terraform/language/functions/textencodebase64) performs the opposite operation, applying target encoding and then Base64 to a string. * [`base64decode`](/terraform/language/functions/base64decode) is effectively a shorthand for `textdecodebase64` where the character encoding is fixed as `UTF-8`.