Developer Encoding Suite • RFC 4648
Base64 Encoder/Decoder
Encode UTF-8 text to Base64 or decode valid Base64 back into text locally.
0 chars • 0 bytes (UTF-8)
Base64 is encoding, not encryption. Anyone who receives the output can decode it.
RFC 4648 Output
0 bytesOutput appears here
What is Base64 Encoder/Decoder?
Base64 is a reversible encoding that represents binary data using letters, digits, plus, slash, and padding. It is not encryption.
How to use
- 1. Choose Encode or Decode.
- 2. Enter text in the input area.
- 3. Copy the output if you need it elsewhere.
About Base64 Encoder/Decoder
Base64 represents bytes as a short alphabet of letters, digits, plus, slash, and optional padding. This developer tool supports text only. In Encode mode it first converts the input to UTF-8 bytes, so accented text and emoji work correctly, then creates the Base64 representation. In Decode mode it ignores whitespace and line breaks, accepts missing padding, validates the alphabet, and converts the decoded bytes back to UTF-8 text.
The browser's bare btoa function is not sufficient for arbitrary Unicode because it expects a binary string. This page uses TextEncoder for UTF-8 encoding and TextDecoder with a fatal validation mode for decoding. A value with invalid Base64 characters, an impossible length, or one stray character after whitespace and padding are removed shows This is not valid Base64. Bytes that are structurally valid Base64 but not valid UTF-8 show a separate, clearer message.
Base64 is an encoding, not encryption. Anyone who receives the output can decode it, so do not treat it as a way to protect passwords, tokens, personal data, or confidential messages. The tool does not encode files, does not support a URL-safe alphabet, and does not add application-specific headers. For web protocols, use the exact alphabet and padding expected by the system receiving your text.
Empty input produces an empty output placeholder without an error. Copy is explicit, and the conversion happens as the input changes without a network request. Nothing is persisted to localStorage, cookies, or a database. Because the logic is pure and uses standard browser APIs, it can handle non-Latin scripts and emoji without breaking surrogate pairs or silently replacing invalid text.
When moving Base64 between systems, preserve the output exactly and check whether the receiving system expects padding, line breaks, or a URL-safe alphabet. This page accepts normal Base64 whitespace and missing padding for convenience, but it intentionally does not transform the URL-safe variant. A successful decode only means the bytes form valid UTF-8 text; it does not prove that the text belongs to the expected application. Treat tokens and credentials as secrets even when they look like ordinary Base64, and clear the page when you finish experimenting.
Encoding changes the size and appearance of text but does not make it smaller in the usual case. If an API expects JSON, a header, or a binary payload, follow that API's exact documentation instead of copying assumptions from another Base64 tool. The plain-language errors are designed to distinguish malformed input from bytes that cannot be read as UTF-8.
Frequently Asked Questions
Does Base64 encrypt text?
No. Base64 is a reversible encoding that represents bytes with letters, digits, plus, slash and padding — anyone who receives the output can decode it instantly. It hides nothing, so never use it to protect passwords, tokens, personal data or confidential messages. Use real encryption for anything secret.
Does Unicode work?
Yes. Encoding uses UTF-8, so non-Latin text and emoji are supported.
Can I decode without padding?
Yes. Missing padding is accepted when the remaining input is valid.
Can it encode a file?
No. This v1 tool accepts text only.
What happens with invalid UTF-8?
The decoder reports that the decoded data is not valid UTF-8 text.
What is Base64 used for?
Base64 carries binary data through systems that only handle text. Common uses include email attachments (MIME), embedding small images in HTML or CSS as data URLs, sending binary payloads inside JSON APIs, and HTTP Basic Authentication headers. It changes the format of data — it does not encrypt or compress it.