SECURITY & ENCODING · BFOTKIT

Base64 encoder and decoder online.

Encode text to Base64 or decode it back with correct UTF-8 handling, with an optional URL-safe alphabet. Everything runs locally in your browser.

Output

Encoding and decoding happen entirely in this browser tab. Nothing is sent to a server.

GUIDE

How to encode and decode Base64

Choose encode or decode

Encoding converts your text into a Base64 string, which is useful for embedding small binary or unusual data in text-only places such as JSON fields, data URIs, or configuration files. Decoding turns Base64 back into readable text. The tool detects obvious mistakes in either direction and reports them instead of producing garbage.

Mind the alphabet and padding

Standard Base64 uses + and / with = padding; the URL-safe variant replaces them with - and _ and can omit padding, which matters inside URLs, cookies, and JWTs. If decoding fails after you enabled the URL-safe option, switch it off, and vice versa. Whitespace and line breaks in the input are ignored automatically.

Know what Base64 is not

Base64 is an encoding, not encryption: it provides no secrecy, and anyone can decode it instantly. Never use it to protect passwords, tokens, or personal data. Its legitimate uses are transport and representation — carrying bytes through systems that only handle text.

Handle UTF-8 correctly

The encoder converts your text to UTF-8 bytes before encoding, so accented letters, Cyrillic, emoji, and other non-ASCII characters survive a round trip exactly. Decoding treats the bytes as UTF-8 and reports an error when they do not form valid text, which usually means the input was binary data rather than text-based Base64.

HELP / FAQ

Base64 questions

Is Base64 the same as encryption?

No. Encryption requires a secret key and is designed to be unreadable without it. Base64 is a reversible text representation anyone can decode; use it for transport, never for protecting secrets.

Why does my decoded text look wrong?

Common causes are mixing the standard and URL-safe alphabets, missing padding, or the input actually being binary data that was Base64-encoded and then partially copied. Enable the URL-safe option for JWT-style strings, keep the padding if present, and decode again.

Can I encode a file?

This tool works with text. For small binary files, paste a data-URI or encode the bytes with a script; the browser-side tool keeps to text so results stay copyable and reviewable.

Does the tool support Unicode and emoji?

Yes. Text is converted to UTF-8 before encoding and decoded from UTF-8 afterward, so accented letters, Cyrillic, Chinese characters, and emoji round-trip correctly.

EXPLORE BY CATEGORY · BFOTKIT

More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

Browse all tools