Bx
ToolPile

Base64 Encoder / Decoder — Free Online

Encode and decode Base64 strings and files.

Advertisement
Advertisement

Base64 Encoding & Decoding

Base64 is a binary-to-text encoding scheme used to embed binary data in text-based formats like JSON, XML, and HTML. Use this tool to encode text or files to Base64, or decode Base64 strings back to their original form.

About Base64 Encoder & Decoder

Base64 is a binary-to-text encoding scheme that converts binary data into a safe ASCII string format. It is used everywhere in modern web development: embedding images directly in HTML or CSS (data URIs), encoding email attachments (MIME), transmitting binary data in JSON APIs, storing complex data in cookies, and encoding authentication credentials in HTTP headers.

The name comes from the 64-character alphabet used: A-Z, a-z, 0-9, plus (+) and slash (/), with equals (=) for padding. Every 3 bytes of binary data become 4 Base64 characters, making the encoded output roughly 33% larger than the original. This size increase is the trade-off for being able to safely transmit binary data through text-only channels.

It is critically important to understand that Base64 is encoding, not encryption. It provides zero security — anyone can decode a Base64 string instantly. Never use Base64 to "hide" passwords, API keys, or sensitive data. It is purely a transport format for making binary data text-safe. If you need security, use proper encryption (AES, RSA) or hashing (SHA-256).

Common use cases include: converting images to data URIs for inline embedding in HTML, decoding JWT token payloads (the middle section of a JWT is Base64-encoded JSON), encoding binary files for inclusion in JSON payloads, and debugging API requests where credentials or data are Base64-encoded.

How to Use

  1. Paste or type the text you want to encode or decode
  2. Select whether you want to encode (text to Base64) or decode (Base64 to text)
  3. View the instant result in the output area
  4. Copy the result for use in your code, API requests, or configuration

Why This Matters

Base64 appears constantly in web development, from JWT tokens to inline images to API authentication headers. Being able to quickly encode and decode Base64 strings is essential for debugging APIs, inspecting tokens, creating data URIs, and understanding how data is being transmitted between systems. This tool makes the process instant without needing to open a terminal or write a script.