Categories

Base64 Encode/Decode

Encode text to Base64 or decode Base64 to text

Mode

Base64 Type

Input

Output

Encode a file or image to Base64

Base64 Encode and Decode Online

This free Base64 tool encodes text into Base64 and decodes Base64 strings back into readable text, with full Unicode support and an optional URL-safe variant. Developers use it to inspect API payloads, craft data URIs, debug Basic Authentication headers, and read values stored in JWTs, email attachments (MIME), and configuration secrets.

Encoding and decoding run entirely in your browser — the data never touches a server, so it is safe to decode tokens and payloads from your own systems.

How to use Base64 Encode/Decode

  1. Choose the mode: Encode (text to Base64) or Decode (Base64 to text).
  2. Choose the Base64 type: Standard (uses + and / with = padding) or URL Safe (uses - and _ without padding).
  3. Paste your input and press Process.
  4. Copy the result or download it as a file.

What is Base64?

Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 safe characters (A–Z, a–z, 0–9, + and /). It exists so binary data can travel through systems designed for plain text — email bodies, JSON strings, URLs, and HTML attributes. Encoding increases size by roughly 33%, since every 3 bytes become 4 characters.

Base64 is an encoding, not encryption: anyone can decode it, and it provides no confidentiality. If you can read a Base64 string, so can everyone else.

Hello, World!  →  SGVsbG8sIFdvcmxkIQ==
Standard Base64 encoding of a simple string.

Standard vs URL-safe Base64

Standard Base64 uses + and /, which have special meanings inside URLs, and pads output with =. The URL-safe variant (RFC 4648 §5) replaces + with - and / with _ and usually omits padding, so encoded values can be embedded in query strings, file names, and JWT segments without extra escaping. This tool adds the required padding back automatically when decoding URL-safe input.

Related terminology

Binary-to-text encoding
A scheme for representing arbitrary bytes using a limited set of printable characters so the data survives text-only channels.
Padding (=)
Trailing equals signs that round a Base64 string to a multiple of four characters. URL-safe Base64 typically omits them.
Data URI
A URL of the form data:image/png;base64,… that embeds a file's Base64-encoded content directly in HTML or CSS.
MIME
The email message format that popularized Base64 for transporting attachments over text-only protocols.

Frequently asked questions

How do I decode a Base64 string?
Select Decode mode, paste the Base64 text, and press Process. If the string uses the URL-safe alphabet (- and _), select URL Safe and the tool restores the padding automatically.
Is Base64 encryption? Is it secure?
No. Base64 is a reversible encoding with no key and no secrecy — never use it to protect passwords or sensitive data. Use real encryption for confidentiality.
Does this tool support Unicode and emoji?
Yes. Text is converted to UTF-8 bytes before encoding, so accented characters, non-Latin scripts, and emoji round-trip correctly.
Why is my Base64 string invalid?
Common causes are stray line breaks or spaces, a truncated string, mixing the standard and URL-safe alphabets, or missing characters at the end. The tool reports an error when the input cannot be decoded.

Related tools