Base64 Encode/Decode

Encode or decode Base64 text and files with auto-detection.

Runs in your browser No sign-up Free forever
Input
Output

What is Base64 encoding?

Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) plus = for padding. It is the standard way to embed binary data — images, certificates, file uploads — inside text-based formats like JSON, XML, or HTTP headers.

This tool can

  • Encode any UTF-8 text into Base64.
  • Decode a Base64 string back to text.
  • Auto-detect the right mode based on your paste.
  • Convert files — drop any file onto the input to get its Base64 representation.
  • Preview images — if you decode an image, you'll see it inline.
  • Generate Data URIs — toggle the option to wrap output as data:<mime>;base64,….
  • URL-safe variant — use - and _ instead of + and / for use in URLs.

When you'd use it

Embedding images inline in CSS or HTML, encoding JWT segments, sending binary payloads through text-only channels, or quickly inspecting a Base64 string from a config file or log.