Encode text to Base64 or decode Base64 back to text. Supports UTF-8, URL-safe mode, and file encoding — all in your browser.
Select any file to encode it as a Base64 data URI (useful for embedding images in HTML/CSS or transmitting binary data).
Base64 is a binary-to-text encoding scheme that converts arbitrary binary data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is not encryption — it is purely an encoding for safe transmission across text-based channels.
src="data:image/png;base64,iVBOR..."username:password as Base64 in the Authorization header.Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _, and usually strips the = padding. Use this mode for JWTs, OAuth tokens, and any Base64 intended for URL parameters.
Input: Hello, World!
Base64: SGVsbG8sIFdvcmxkIQ==
URL-safe: SGVsbG8sIFdvcmxkIQ
Each group of 3 bytes becomes 4 Base64 characters. The = padding aligns to the 3-byte boundary. UTF-8 characters outside ASCII are encoded byte-by-byte — this tool handles that correctly using the Web API TextEncoder.