🚀 200+ Free Tools — No Signup Required!

Base64 Decoder

Binary & Encoding ✓ 100% Free ⚡ No Signup

Decode Base64 encoded strings.

Base64 Decoder

Ready

What Is Base64 and How Does It Work?

Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, and the symbols + and /, with = used as padding. The name "Base64" comes from the fact that it uses exactly 64 characters to represent data. The Toolsiro Base64 tool lets you decode any Base64 string back to plain text, encode text to Base64, and convert files (images, documents, binaries) to their Base64 representation — all in your browser without uploading anything to a server.

How Base64 Encoding Works

Base64 works by converting every 3 bytes (24 bits) of binary data into 4 Base64 characters (each representing 6 bits). This means Base64 output is always approximately 33% larger than the original input — for every 3 bytes in, 4 characters come out.

  • The text "Man" (3 bytes: 0x4D, 0x61, 0x6E) encodes to "TWFu" in Base64.
  • The text "Hello" (5 bytes) encodes to "SGVsbG8=" — the trailing = is padding because 5 bytes is not evenly divisible by 3.
  • The text "Hello World" (11 bytes) encodes to "SGVsbG8gV29ybGQ=".

If the input byte count is not a multiple of 3, one or two = characters are added at the end as padding to keep the output length a multiple of 4.

Common Uses of Base64

  • Email attachments (MIME): Email was designed to carry only ASCII text. When you attach a file to an email, your email client encodes it in Base64 so it can travel safely over email protocols. The attachment is decoded automatically on the receiving end.
  • Embedding images in HTML and CSS: Images can be embedded directly in web pages as Base64 data URIs instead of separate files: <img src="data:image/png;base64,iVBORw0K...">. This reduces HTTP requests but increases page weight.
  • JSON and XML data transmission: When binary data (images, audio, PDFs) needs to be included in a JSON or XML payload, Base64 encoding allows it to travel as a text field.
  • HTTP Basic Authentication: The HTTP Authorization header uses Base64 to encode credentials: Authorization: Basic dXNlcjpwYXNz decodes to "user:pass".
  • JWT (JSON Web Tokens): JWT tokens consist of three Base64url-encoded segments separated by dots: header.payload.signature. The header and payload are Base64url-decoded to reveal the JSON claims.
  • Cryptographic keys and certificates: PEM-format SSL/TLS certificates are Base64-encoded X.509 binary data wrapped in -----BEGIN CERTIFICATE----- headers.
  • CSS fonts and icons: Web fonts and SVG icons are sometimes embedded in CSS files as Base64 data URIs to avoid additional HTTP requests.

Base64 vs Base64url

Standard Base64 uses + and / characters which have special meaning in URLs. Base64url (URL-safe Base64) replaces + with - and / with _, and typically omits padding. This variant is used in JWT tokens, OAuth tokens, and any context where the encoded data must appear in a URL.

The Toolsiro decoder automatically handles both variants — it recognises - and _ and converts them before decoding.

Is Base64 Encryption?

No — Base64 is an encoding, not an encryption. Anyone who can see a Base64 string can decode it instantly without a key. It provides no security whatsoever. It is used purely to make binary data safe for text-based transmission systems, not to protect data. Do not use Base64 to "hide" passwords, API keys, or sensitive information — it offers zero protection.

Decoding Base64 — Common Issues

  • Missing padding: If a Base64 string does not have the correct number of = padding characters, some decoders fail. The Toolsiro decoder automatically adds missing padding.
  • Whitespace and line breaks: Standard Base64 in email and certificates includes line breaks every 76 characters (per RFC 2045). The decoder ignores whitespace automatically.
  • URL-safe characters: If the encoded string contains - or _ instead of + or /, it is Base64url encoded. The decoder converts these automatically.
  • Non-UTF-8 output: Base64 can encode any binary data, not just text. Decoding a Base64-encoded image or binary file will produce garbled characters in a text decoder — use the File tab to handle binary files.

Related Tools

For URL encoding of text for use in web addresses, use the URL Encoder. For encoding and hashing passwords, use the Password Generator.

Frequently Asked Questions

Yes, Base64 Decoder is completely free with no signup required. Use it unlimited times.
Absolutely. All processing happens in your browser. No data is sent to or stored on our servers.
Yes, it works on all devices — smartphones, tablets, and desktops.
No, Base64 Decoder runs entirely in your browser. No installation needed.