Encode string to Base64

⇄ Switch to Decode


How Base64 Encoding Works

Base64 (defined in RFC 4648) converts arbitrary binary bytes or UTF-8 text into a 64-character ASCII alphabet (A-Z, a-z, 0-9, +, /, with = padding) so data survives text-only transports such as HTTP headers, JSON payloads, email MIME bodies, and XML documents without corruption.

  • Common Uses: Encoding Authorization: Basic credentials, embedding small assets as Data URIs, and passing tokens or binary blobs inside JSON.
  • Size Overhead: Base64 increases payload size by roughly 33% (3 bytes become 4 ASCII characters). It is an encoding, not encryption - never use it alone to hide secrets.
  • API & Examples: Need to decode Base64 or call this tool from scripts/AJAX? Use our Base64 Decoder or read the Base64 API & FAQ.
Please read the privacy policy (agreement of the cookies usage, other websites embedded content, etc.). If you continue to use the site, we will assume that you agree with our privacy policy.
OkPrivacy Policy