Base64 Text & URL-Safe Encoder/Decoder

Encoding text as base64 for auth headers, data URIs or JWT segments? Encode, decode, and switch to URL-safe — all locally, Unicode included.

Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/base64-tools" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/base64-tools" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - Base64 Text & URL-Safe Encoder/Decoder</a></div>

What base64 is for

Base64 encodes binary data into 64 printable ASCII characters so it survives text-only channels: email attachments (MIME), HTTP Basic auth (user:pass), data URIs in CSS/HTML (data:image/png;base64,...), and the base64url segments of JWTs. Every 3 bytes become 4 characters, so output is ~33% larger than input.

Standard vs URL-safe

Unicode note

Text is encoded as UTF-8 first, so emoji and CJK work correctly both ways — a common bug with naive encoders that mangle non-ASCII input.

Pair with the JWT Decoder if you're working with tokens (all three segments are exactly base64url).