Blog | G5 Cyber Security

Decode Base64 Payload

TL;DR

This guide shows you how to decode a string encoded in Base64 and check if the decoded result looks like useful data (e.g., text, JSON, or a common file format). We’ll cover online tools and command-line methods.

Steps

  1. Understand Base64
  2. Base64 is a way to represent binary data as ASCII characters. It’s often used when you need to send files or other non-text data through systems that only handle text. Decoding turns the Base64 string back into its original form.

  3. Online Decoder
  4. The easiest way is using an online decoder:

  • Command Line (Linux/macOS)
  • If you’re comfortable with the command line, use this:

    base64 -d <your_base64_string>

    For example:

    echo "SGVsbG8gd29ybGQh" | base64 -d

    This will output: Hello world!

  • Command Line (Windows)
  • PowerShell can decode Base64:

    [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(""))

    For example:

    [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("SGVsbG8gd29ybGQh"))

    This will output: Hello world!

  • Check the Output Type
  • Multiple Decodes (Rare)
  • Sometimes a string is encoded multiple times. Try decoding it several times in a row. This is uncommon, but worth trying if the first decode doesn’t produce anything meaningful.

    Exit mobile version