How to encode and decode Base64 text with UTF-8
Convert text to standard Base64, check a round trip, and distinguish unsupported formats from text decoding errors.
Open the toolChoose the right kind of input
Use this converter when you have text to encode, or standard Base64 that represents UTF-8 text to decode. It is a text utility, with no file upload, character-set selector or image preview. A complete data URI and a JWT are not the same input as a single standard Base64 text value. Check what produced your value before trying to decode it. Base64 is a reversible encoding, not encryption; anyone with the value can attempt to decode it without a secret key.
Encode a short sample first
Open the Base64 Converter. Choose Encode under Operation, type foo into Input with no quotes or extra line break, and select Apply. Result is Zm9v. Use Copy to transfer the result. For a non-ASCII check, İstanbul becomes xLBzdGFuYnVs. The converter uses UTF-8 bytes, so Turkish letters, accented text and emoji do not have to be replaced with plain English letters. Keep the source text separately if you will need to compare it after another operation.
Decode and compare the recovered text
Choose Decode, put Zm9v into Input, and apply the operation; the output is foo. Repeat with xLBzdGFuYnVs and check that İstanbul returns with its dotted capital İ intact. Editing the input or changing the operation clears the old result, so apply again after each change. Encoding foo with an added space or line break gives a different value. In Decode mode, whitespace around or inside the encoded value is removed before validation; whitespace in the recovered text is not removed.
Understand alphabet, padding and UTF-8 failures
Standard Base64 uses + and / where base64url uses - and _. This tool has no base64url mode and rejects those alternative alphabet characters. Do not paste a data:text/plain;base64, prefix into the decoder. It accepts correctly formed padded values and supported unpadded equivalents, but malformed padding or invalid alphabet characters fail. Valid Base64 bytes may still be unsuitable for a text decoder: /w== represents a byte that is not valid UTF-8 text, so this tool reports an error rather than displaying arbitrary binary data.
Check the result in its destination
Copy only the value needed by the receiving application and check its required alphabet, padding and character encoding. Encoding makes three input bytes into four Base64 characters before padding effects; it is not a way to compress a large file. Non-ASCII text can use several UTF-8 bytes per visible character. The conversion runs locally in the browser without uploading the text. That does not make the encoded result confidential: consider what the receiving service will do with it before pasting or sharing it.
Sources
Updated:
Try it in the tool →