Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 strings back to text.
What is Base64 Encoder / Decoder?
Encode text to Base64 online or decode Base64 strings back to plain text — instantly, for free, with no signup required. Base64 is an encoding scheme that converts binary or text data into a portable string of ASCII characters. It is widely used to embed images inline in HTML and CSS (data URIs), transmit binary data in JSON payloads, encode email attachments (MIME), pass data safely in URLs, and store binary data in text-based systems like databases and configuration files.
How to Use Base64 Encoder / Decoder
- Choose a mode: Encode (text → Base64) or Decode (Base64 → text).
- Type or paste your input text into the left area.
- The output updates automatically, or click the Encode/Decode button.
- Click Copy to copy the output, or use the Swap button to flip input and output.
Frequently Asked Questions
Base64 converts data into a string using 64 safe ASCII characters (A–Z, a–z, 0–9, +, /). It increases data size by about 33% but makes binary data safe to transmit in text-based protocols.
No. Base64 is an encoding scheme, not encryption. It does not provide any security. Anyone can decode a Base64 string without a key. Never use Base64 to hide sensitive data.
The = characters are padding. Base64 encodes data in 3-byte chunks. If the input length isn't a multiple of 3, padding characters are added to ensure the output length is a multiple of 4.
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces these with - and _ so the encoded string can be safely used in URLs and filenames.
To encode a binary file (like an image) to Base64, you would need to read the file as binary data first. This tool handles text-to-Base64 encoding. For binary files, use a file-upload Base64 tool or a command like: base64 -i image.png on macOS/Linux.