Skip to Content
gnux

-d, --decode

Decode data.

An option of base64x.

Usage

base64x -d [FILE]
base64x --decode [FILE]

Details

ShortLongValueDefaultMeaning
-d--decodenonedecode data

Examples

Decode a value you found in a config file or an API response

echox aGVsbG8= | base64x -d
Output
hello

Turn that secret back into the key file in a CI job

printfx '%s' "$DEPLOY_KEY" | base64x -d > deploy-key.bin

Decode text pasted from an email, where line breaks and stray characters crept in

base64x -d -i pasted.txt > attachment.pdf

Make sure a round trip gives back the same bytes

base64x file.bin | base64x -d > copy.bin && cksumx file.bin copy.bin

Reject a payload that is not valid base64 before using it

base64x -d payload.txt > /dev/null && echox valid

Help in the terminal

gnux help base64x --decode

On this page