FabricTools v0.33.0 Public Preview

Convert-FromBase64

Decodes a Base64-encoded string into its original text representation.

Syntax

Convert-FromBase64 [-Base64String] <string> [<CommonParameters>]

Description

The Convert-FromBase64 function takes a Base64-encoded string as input, decodes it into a byte array, and converts it back into a UTF-8 encoded string. It is useful for reversing Base64 encoding applied to text or other data.

Examples

Example 1

Output: Hello, World!

Convert-FromBase64 -Base64String "SGVsbG8sIFdvcmxkIQ=="

Example 2

Output: Some encoded text

$encodedString = "U29tZSBlbmNvZGVkIHRleHQ="
Convert-FromBase64 -Base64String $encodedString

Parameters

NameTypeReq.Pos.PipelineDescription
-Base64String string ✓Required 0 –

The Base64-encoded string that you want to decode.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

This function assumes the Base64 input is a valid UTF-8 encoded string. Any decoding errors will throw a descriptive error message.

Author: Tiago Balabuch