Base64 Encoder / Decoder

Runs in your browser. Nothing is uploaded.
Text
How to Use the Base64 Encoder / Decoder
  1. Choose a mode: Use the Mode dropdown to select Text, Image, File, or Custom MIME. Each mode enables the appropriate input fields.
  2. Text mode: Enter or paste your text in the input box. Use Strip whitespace (encode) to remove all spaces, tabs, and newlines before encoding (optional, off by default). Click Encode to get the Base64 result, or Decode to convert Base64 back to text.
  3. Advanced Settings: Options like Show as Data URI (output) and Ignore whitespace (decode) are available in the Advanced Settings panel. These are rarely needed for typical use, but can help with special cases (e.g., line-wrapped Base64 or embedding output in HTML/CSS).
  4. Image/File/Custom MIME modes: Upload a file to encode. For Custom MIME, specify the MIME type (e.g., application/pdf). Only encoding is supported for files. Files must be 5 MB or smaller.
  5. Image preview: When a valid image Base64 is detected, a preview appears below the output. Use Show image preview (force) in Advanced Settings to preview non-standard images.
  6. Copy output: Use the copy button to copy the Base64 or Data URI result to your clipboard.
  7. All processing is local: Your data never leaves your browser. No files or text are uploaded to any server.

Frequently Asked Questions