Base64 Encoder & Decoder

Encode text or files to Base64, decode Base64 strings, convert images to data URLs β€” all in your browser. Zero upload.

πŸ”’ 100% Client-Side πŸ“„ Text Encode/Decode πŸ“ File β†’ Base64 πŸ–Ό Image β†’ Data URL πŸ”— URL-Safe Base64
Input plain text
Chars: 0
Bytes: 0
Output base64
Chars: 0
Size ratio: β€”
πŸ“

Drop any file here

or click to browse β€” converted to Base64 in-browser

πŸ–Ό

Drop an image here

PNG, JPG, GIF, WebP, SVG β†’ Base64 data URL for CSS/HTML

preview
What is URL-safe Base64? Standard Base64 uses +, / and = which break URLs. URL-safe Base64 (RFC 4648) replaces them with -, _ and no padding. Used in JWT tokens, OAuth, file names.
Plain Text
URL-Safe Base64
Character mapping
+ (standard)- (safe)
/ (standard)_ (safe)
= (padding)omitted
Convert between formats
Standard Base64
⇄
URL-Safe Base64

What is Base64?

Base64 is an encoding scheme that converts binary data to ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It's used to safely transmit binary data over text-only channels like email, HTML attributes, or JSON.

Common uses

  • πŸ“§ Email attachments β€” MIME encoding
  • πŸ” JWT tokens β€” header and payload are URL-safe Base64
  • πŸ–Ό Data URLs β€” embed images directly in HTML/CSS
  • πŸ”‘ API keys β€” Basic Auth encodes user:pass in Base64
  • πŸ“¦ Binary in JSON β€” store binary blobs in JSON fields

Size overhead

Base64 encoding increases size by approximately 33% β€” every 3 bytes of input become 4 characters of output. Padding with = aligns to 4-char blocks.

Base64 alphabet

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/