Free Base64 Encode / Decode Online
Encode text to Base64 or decode Base64 strings back to plain text. Supports UTF-8 encoding.
Base64 is an encoding that represents binary data as ASCII text using 64 printable characters. It is used any time you need to embed bytes inside a context that expects text — email attachments, data URLs in HTML and CSS, tokens in URLs, and JSON fields that carry binary payloads. This tool encodes a plain string to Base64, or decodes Base64 back to the original text, using the browser's built-in TextEncoder so Unicode characters are handled correctly. Processing is entirely client-side; nothing you paste is transmitted anywhere.
Base64 Encoder / Decoder
How to use this base64 encode / decode
- Paste the text you want to encode into the Encode box — it accepts any UTF-8 string, including emoji and non-Latin scripts.
- Click Encode to see the Base64 representation.
- To decode, paste a Base64 string into the Decode box and click Decode. Invalid input is flagged with an error.
- Click Copy to put the result on your clipboard.
- Use the output anywhere a text-only context requires binary data (data URLs, JWT inspection, config files).
Common use cases
- Embedding an image directly in an HTML or CSS file via a data URL
- Decoding the payload of a JWT or other opaque token to inspect its contents
- Preparing a binary value (certificate, key, small image) for inclusion in a JSON field
- Sending non-ASCII text through a transport that is not 8-bit clean, such as some email headers
- Quickly checking what a Base64 string you found in a log or config actually contains
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone who sees the output can decode it back to the original in one step. Never use Base64 to hide secrets — use a real encryption algorithm and a proper key if you need confidentiality.
Why is Base64 output roughly 33% larger than the input?
Base64 represents every three input bytes as four output characters (plus padding), a ratio of 4/3 or about 33% more size. That overhead is the cost of keeping the data text-safe.
Does this handle Unicode correctly?
Yes. The tool uses TextEncoder to convert your input to UTF-8 bytes before encoding, so emoji, accented characters, and non-Latin scripts round-trip faithfully. The older JavaScript btoa() function does not handle Unicode directly, which is why it often fails on characters outside Latin-1.
What is the difference between Base64 and Base64url?
Base64url replaces + and / with - and _ so the output is safe inside URL paths and query parameters without further escaping, and it often omits the = padding. This tool produces standard Base64; convert + to -, / to _, and strip = if you need the url-safe variant.
Can this decode an image?
It can decode the Base64 string back to raw bytes, but the output is displayed as text, so a binary image will look like garbage. To view an image from a Base64 data URL, paste the full data:image/...;base64,... string directly into a browser's address bar.