# Base64 Encoder/Decoder

> Encode text to Base64 or decode it back with correct UTF-8 handling and an optional URL-safe alphabet. Free, private, and runs entirely in your browser.

[bfotkit](/) Runs in your browserCategories ▾[All tools 307](/en/tools/)[Text tools9](/en/tools/text-tools/)[Image tools27](/en/tools/image-tools/)[PDF tools20](/en/tools/pdf-tools/)[Social media tools97](/en/tools/social-media-tools/)[Security tools8](/en/tools/security-tools/)[Coding tools25](/en/tools/coding-tools/)[CSS tools12](/en/tools/css-tools/)[Color tools6](/en/tools/color-tools/)[Miscellaneous tools103](/en/tools/miscellaneous-tools/)

[All tools ↗](/en/tools/)[EN](/en/tools/base64-encoder-decoder/)[PT](/pt-br/ferramentas/codificador-base64/)[DE](/de/werkzeuge/base64-kodierer/)[ID](/id/alat/pengode-base64/)[RU](/ru/instrumenty/kodirovshik-base64/)

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.

InputEncode to Base64Decode from Base64

URL-safe alphabet (- and _)OutputCopy

This is not valid Base64: characters outside the alphabet, wrong padding, or the decoded bytes are not valid UTF-8 text.

Clear

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.

[All tools 307](/en/tools/)[Text tools 9](/en/tools/text-tools/)[Image tools 27](/en/tools/image-tools/)[PDF tools 20](/en/tools/pdf-tools/)[Social media tools 97](/en/tools/social-media-tools/)[Security tools 8](/en/tools/security-tools/)[Coding tools 25](/en/tools/coding-tools/)[CSS tools 12](/en/tools/css-tools/)[Color tools 6](/en/tools/color-tools/)[Miscellaneous tools 103](/en/tools/miscellaneous-tools/)

[Coding toolsPrivate JSON formatter and text cleanup tools↗](/en/tools/private-json-text-cleanup/)[Coding toolsURL Slug Generator↗](/en/tools/url-slug-generator/)[Coding toolsURL Encoder/Decoder↗](/en/tools/url-encoder-decoder/)[Coding toolsHTML Encoder/Decoder↗](/en/tools/html-encoder-decoder/)[Coding toolsHAR Sanitizer↗](/en/tools/har-sanitizer/)[Coding toolsJSON Formatter↗](/en/tools/json-formatter/)[Coding toolsJSON Validator↗](/en/tools/json-validator/)[Coding toolsJSON Tree Viewer↗](/en/tools/json-tree-viewer/)

[Browse all tools →](/en/tools/)

[bfotkit](/)[All tools](/en/tools/)[Privacy Policy](/en/privacy-policy/)[Terms & Conditions](/en/terms-and-conditions/)[About Us](/en/about-us/)[Contact Us](/en/contact-us/)

Useful tools. No fuss. © 2026 BFOTKit[bfotkit.com ↗](https://bfotkit.com/)
