64

Base64 Encoder / Decoder

Encode or decode Base64 strings instantly. Free, private, runs entirely in your browser.

💻 Developer Tools Free Browser-based
Tool

What Is Base64 Encoding?

Base64 is an encoding scheme that converts binary or text data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It converts every 3 bytes of input into 4 characters of output, increasing data size by approximately 33%. The key advantage is that the output contains no special characters that could break surrounding data formats — so a Base64 string is safe to include inside JSON, HTML attributes, XML, HTTP headers, URLs and email bodies without escaping or quoting.

Common Uses for Base64

  • Embedding images in HTML/CSSsrc="data:image/png;base64,..." embeds an image directly, eliminating an HTTP request. Useful for small icons in CSS or email images.
  • HTTP Basic Authentication — credentials are sent as Authorization: Basic Base64(username:password) in request headers.
  • JSON Web Tokens (JWT) — the header and payload sections of a JWT are Base64Url encoded (a URL-safe variant).
  • Email attachments (MIME) — binary file attachments are Base64 encoded so they survive transmission through text-only email infrastructure.
  • Storing binary data in text fields — databases and config files that only support text can store binary blobs as Base64 strings.

Base64 Is NOT Encryption

Base64 encodes — it does not encrypt or obscure data. Anyone with the encoded string can decode it instantly using any Base64 decoder. A Base64 string looks scrambled but contains exactly the same information as the original. Never use Base64 to protect passwords, tokens or confidential information. For actual security, use AES encryption or a proper hashing algorithm like bcrypt.

Standard Base64 vs Base64Url

Standard Base64 uses + and / as the 62nd and 63rd characters, which are special characters in URLs. Base64Url replaces them with - and _ and omits the trailing = padding. JWTs and most modern web APIs use Base64Url encoding. This tool uses standard Base64.

Frequently Asked Questions