Base64 Encode / Decode
Convert text to and from Base64, with full UTF-8 support and a URL-safe variant. Encoding and decoding run locally in your browser.
About this tool
Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters. It is used to embed images in CSS or HTML (data URIs), send binary payloads inside JSON, encode credentials in HTTP Basic Auth headers, and store data in places that only accept text. This tool encodes and decodes Base64 with correct UTF-8 handling, so emoji and non-Latin scripts survive the round trip.
Standard vs URL-safe Base64
Standard Base64 uses + and /, which have special meaning in URLs. The URL-safe variant replaces them with - and _ and drops padding, so the result can be placed directly in a URL or filename. JSON Web Tokens (JWTs), for example, use URL-safe Base64.
Why UTF-8 matters
Naively Base64-encoding a string with the browser's built-in function mangles any character outside Latin-1. This tool encodes through UTF-8 first, so "café", "日本語" and "🚀" all encode and decode correctly.
Frequently asked questions
Base64 encodes binary data as text so it can travel through text-only channels — embedding images as data URIs, putting binary blobs inside JSON, HTTP Basic Auth headers, and email attachments are common examples.
No. Base64 is encoding, not encryption. It is fully reversible by anyone and provides no security — never use it to protect passwords or sensitive data.
A variant that replaces the + and / characters with - and _ and usually omits the = padding, so the encoded string is safe to use inside URLs, query strings and filenames. JWTs use this variant.
Yes. The tool encodes via UTF-8, so multibyte characters such as accented letters, CJK scripts and emoji are preserved correctly in both directions.