icon

Base32, Base64

Last modified: 2023-04-04

Base-* are numeral systems. Especially Base32 and Base64 are often used.

Decode

Base16

base16 -d encoded.txt
echo -n '68656c6c6f0a' | base16 -d

Base32

base32 -d encoded.txt
echo -n 'NBSWY3DP' | base32 -d

Base64

base64 -d encoded.txt
echo -n 'aGVsbG8=' | base64 -d
  • PowerShell Encoded Command

    If we found the PowerShell command contained -encodedcommand when malware analysis, we can decode it with CyberChef.

    1. Paste the PowerShell command.
    2. Add the "From Base64" operation to Recipe.
    3. Add the "Decode Text" operation to Recipe and choose the "UTF-16LE" Encoding.

Encode

Base16

base16 example.txt
echo -n 'hello' | base16

Base32

base32 example.txt
echo -n 'hello' | base32

Base64

base64 example.txt
echo -n 'hello' | base64

Generate Random Passwords

Base64

openssl rand -base64 3