Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text. Supports UTF-8, URL-safe mode, and file encoding — all in your browser.

Privacy: All processing happens in your browser. Your input is never sent to our servers.

Select any file to encode it as a Base64 data URI (useful for embedding images in HTML/CSS or transmitting binary data).

What Is Base64?

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.

Common Use Cases

URL-Safe Base64

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.

Worked Example

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.

Awesome findWhatIsMyIP Blog