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?
Yes. The input is converted to UTF-8 bytes before encoding, so emoji, accents, CJK characters, and any other Unicode all work correctly.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + 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.
Can I decode Base64 from a JWT?
JWT segments use URL-safe Base64 without padding. Enable the URL-safe toggle, paste a single segment (header or payload), and you will get the decoded JSON. The dedicated JWT Decoder handles the whole token in one step.
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode it, so never use Base64 alone to protect secrets.