Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text. UTF-8 safe, with an optional URL-safe variant.
About Base64
Base64 is a binary-to-text encoding scheme that represents arbitrary bytes using 64 printable ASCII characters. It is widely used to embed binary data in JSON, transmit credentials in HTTP Basic auth headers, embed images in data URIs, and carry binary payloads through systems that only handle text.
Encoding
This tool encodes UTF-8 text correctly. Behind the scenes, it converts the input to a UTF-8 byte sequence and then maps every three bytes to four Base64 characters. The standard alphabet is A–Z a–z 0–9 + / with = as padding.
URL-safe variant
Some systems (JWT, URL parameters, file names) require a URL-safe Base64 alphabet that replaces + with -, / with _, and usually omits the trailing = padding. Toggle the URL-safe option to switch alphabets.
Privacy
The encoding and decoding happen entirely in your browser using the standard TextEncoder and btoa/atob APIs. Nothing is sent to a server, so you can safely encode sensitive values like access tokens or credentials.
Frequently asked questions
Does this tool handle emoji and non-ASCII text?
What is the difference between standard and URL-safe Base64?
+ and /, plus = padding. URL-safe Base64 uses - and _ and usually drops the padding so the output can be placed in URLs and filenames without escaping.