Skip to content

Base64 Encoder/Decoder

Encode and decode Base64 strings instantly.

Input

Base64 Encoded

Base64 Input

Decoded Output

About Base64 Encoding

Base64 Encoding is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used in web development and data transmission.

Common Use Cases

  • Encoding images in HTML/CSS via Data URLs
  • Data URLs for web resources
  • Email attachments (MIME)
  • API authentication tokens
  • Storing binary data in text format
  • JWT tokens and credentials

Key Features

  • Converts binary to ASCII text
  • Uses A-Z, a-z, 0-9, +, / characters
  • Padding with = characters
  • Increases data size by ~33%
  • Reversible encoding
  • Safe for text-based protocols

MIME Types and Base64

Base64 encoding is commonly used with MIME types for embedding data in HTML, CSS, and other text formats. Common MIME types:

  • image/png - PNG images
  • image/jpeg - JPEG images
  • image/gif - GIF images
  • image/webp - WebP images
  • image/svg+xml - SVG images
  • audio/mpeg - MP3 audio
  • video/mp4 - MP4 video
  • application/pdf - PDF documents
  • application/json - JSON data
  • text/plain - Plain text
  • font/woff2 - Web fonts
  • application/zip - ZIP archives

Example data URL: data:image/png;base64,iVBORw0KGgo...

Sources & References