Base64 Encoder / Decoder

Encode text or files to Base64, or decode Base64 strings back to readable text.

0 characters
0 characters
0 characters
Invalid Base64 input. Please check your string and try again.
0 characters
📁
Click to select a file, or drag and drop here
Any file type supported

Image Preview

Preview

How to use

  • Encode: Type or paste text into the input box — Base64 output is generated instantly
  • Check "URL-safe" to replace + and / with - and _ (safe for use in URLs and filenames)
  • Check "Line breaks" to wrap output at 76 characters per line (MIME standard)
  • Decode: Paste a Base64 string — the decoded text appears instantly. URL-safe variants are auto-detected
  • File Encode: Select or drag any file to get its Base64 data URL. Images will show a preview
  • Use Copy Output to copy results to your clipboard

About this Base64 Encoder/Decoder

Base64 converts binary data into a text-safe format using only 64 printable characters (A–Z, a–z, 0–9, +, /), which lets images, files, or arbitrary binary data pass safely through systems that only handle plain text, like email or JSON.

Base64 is encoding, not encryption

This is the single most important thing to understand about Base64: it provides zero security. Anyone can decode Base64 text back to its original form instantly — there is no key, password, or secret involved. It is purely a format conversion for compatibility, not a way to protect or hide sensitive data.

Why encoded text is longer than the original

Base64 represents every 3 bytes of original data as 4 characters, which means encoded output is roughly 33% larger than the source. This size increase is the trade-off for making binary data safely transportable as plain text.

Common uses

  • Embedding small images directly inside HTML or CSS (data URIs) instead of a separate file request
  • Sending binary attachments through email, which was originally designed for plain text
  • Encoding authentication credentials in HTTP Basic Auth headers
  • Storing binary data inside JSON or XML, which only support text values