GO KALI FREE

Encoding & Decoding

Base64 Encoder / Decoder for Security

Encode and decode Base64 in real-time. Learn why attackers use Base64 to obfuscate malware payloads, PowerShell commands, and phishing data, and how to decode them for analysis.

What Is Base64?

Base64 is an encoding scheme that converts binary data into ASCII text using a 64-character alphabet (A-Z, a-z, 0-9, +, and /). Each Base64 character represents 6 bits, so three bytes of input become four characters of output. Base64 is not encryption: it provides no confidentiality and can be reversed by anyone, which is exactly why it appears so often in security work as a tool for transport and, unfortunately, for obfuscation.

Legitimate uses of Base64 include embedding binary data in text formats like JSON and XML, transmitting binary attachments in email (MIME), and encoding small images or fonts directly in CSS and HTML. Because it is reversible and adds about 33% size overhead, Base64 is a transport convenience rather than a security measure. Understanding this distinction is critical: a Base64 string is plaintext in disguise, not a secret.

This tool encodes and decodes entirely in your browser, so you can safely inspect suspicious strings, deobfuscate payloads, and analyze data without sending anything to a remote service.

Why Attackers Use Base64

Because Base64 looks like opaque gibberish to a human but is trivially reversible, attackers use it to hide payloads from cursory inspection. A common pattern on Windows is the PowerShell -EncodedCommand flag, which accepts a Base64-encoded command that executes without the plaintext appearing in the script. Decoding these strings is often the first step in understanding what a suspicious script or macro actually does.

Malware authors also Base64-encode payloads, configuration data, and stolen credentials to evade signature-based detection that scans for readable strings. Web shells, phishing kits, and malicious browser extensions frequently store their next-stage payload as a Base64 blob that is decoded at runtime. Decoding the blob reveals the real intent, whether that is a reverse shell, a credential stealer, or a command-and-control beacon.

Data exfiltration is another abuse: attackers sometimes Base64-encode stolen data to smuggle it past filters that block raw binary or to hide sensitive content in otherwise normal-looking HTTP requests. Recognizing a long, high-entropy Base64 string in an unexpected place is a useful detection heuristic for analysts reviewing logs and traffic.

Detecting and Decoding Base64 Abuse

Detection of Base64 abuse relies on recognizing the character set, the typical length and padding (= or ==), and unusually high entropy. Security tools and SIEM rules can flag long Base64 strings in places they should not appear, such as a User-Agent header, a cookie, or a query parameter. This tool helps you manually decode any such string to determine whether it is benign data or a hidden payload.

When analyzing a suspicious string, decode it and inspect the result. If the decoded output is itself Base64 or another encoding, attackers may be nesting encodings to add layers of obfuscation, a technique you can peel back iteratively. If the decoded output is executable code, a shell command, or a script, treat it as potentially malicious and analyze it in a safe environment.

Remember that legitimate applications also use Base64 extensively, so presence alone is not malicious. Context matters: Base64 in an image data URI is normal, while Base64 passed to a PowerShell execution command is suspicious and deserves investigation.

How to encode or decode Base64

  1. 1
    Choose a mode
    Select Encode to convert plain text to Base64, or Decode to reverse a Base64 string back to readable text.
  2. 2
    Enter your input
    Type or paste the text to encode, or the Base64 string to decode, into the input area. Conversion happens live.
  3. 3
    Inspect the output
    Review the result. If decoding a suspicious string, examine whether the output is a command, script, or another layer of encoding.
  4. 4
    Copy the result
    Copy the converted output to your clipboard for further analysis or documentation.

Frequently Asked Questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. It provides no confidentiality and can be reversed by anyone. Never rely on Base64 to protect sensitive data.

Why do malware authors use Base64?

Base64 hides readable payloads from cursory inspection and some signature-based detection. Decoding the string reveals the actual command or payload the malware intends to execute.

What is a PowerShell EncodedCommand?

PowerShell accepts a -EncodedCommand flag containing a Base64-encoded command. Attackers use it to execute scripts without the plaintext appearing in the file, so decoding is key to analysis.

How can I tell if a string is Base64?

Base64 uses A-Z, a-z, 0-9, +, /, and = padding. Long strings of these characters in unexpected places, especially with high entropy, are worth decoding and investigating.

Can Base64 be detected by security tools?

Yes. SIEM rules and filters can flag long Base64 strings or Base64 in unusual locations like headers or query parameters. Context determines whether it is benign or suspicious.

Why does Base64 output look like random text?

Because it encodes binary bits into a restricted character set, the output appears as a sequence of letters and numbers with no obvious meaning, which is why it is effective for obfuscation.

How do I detect multiple layers of encoding?

Decode the string iteratively. If the decoded output still looks like Base64 (matching the charset and padding), decode again. Attackers sometimes nest multiple encodings to evade detection, so peeling back layers reveals the actual payload.

What is URL-safe Base64?

URL-safe Base64 replaces + with - and / with _ to make the encoded string safe for URLs and filenames. It is commonly used in JWTs and web tokens. Standard Base64 may cause issues in URL contexts.

Is Base64 used in authentication?

Base64 is used in HTTP Basic Authentication (base64-encoded username:password), JWTs (Base64url-encoded header and payload), and API tokens. In Basic Auth, Base64 provides no security—always use HTTPS alongside it.

How do I identify a Base64 string in logs?

Look for strings using only A-Z, a-z, 0-9, +, /, and = padding. Long, high-entropy strings of these characters in unexpected places (headers, cookies, query parameters) are worth decoding and investigating.