Base64 Encoder and Decoder
Encode UTF-8 text as standard Base64 or Base64URL, and decode it back to text.
Runs in your browser. Your input stays on this device.
What this tool does
Convert UTF-8 text to standard Base64 or Base64URL and recover UTF-8 text from the encoded form.
When to use it
Check a text transport fixture when a service disagrees on alphabet, padding or Unicode encoding.
How to use it
- Choose Encode for plain text or Decode for an encoded string.
- Select Standard Base64 or Base64URL according to the receiving format.
- Run Convert Base64 and check the result before passing it to another system.
Worked example
Enter café in Encode mode and choose the standard alphabet. The output is Y2Fmw6k=. Switch to Decode, paste that output and run the converter again to recover café. The accent is represented by multiple UTF-8 bytes before Base64 encoding, which is why using an ASCII-only workflow can give a different result. Try the same round trip in Base64URL mode when preparing a test value for a URL-safe interface. For a readable multiline sample, compare the displayed text with the original and check whether the source document included a final newline.
caféY2Fmw6k=Supported features and limitations
The decoder displays UTF-8 text. Base64 encodes data and provides no confidentiality. Binary payloads require a separate file workflow.
Common mistakes and edge cases
Base64URL uses hyphen and underscore in place of plus and slash. Choose the alphabet specified by your API. Standard Base64 copied from a MIME message may be wrapped across several lines, and the decoder accepts whitespace in that input. Surrounding quotes or a data URL prefix have a different purpose and should be removed before pasting. Preserve the source text’s spaces and line endings when byte-for-byte equality matters. When troubleshooting a mismatch with another encoder, compare a tiny sample first. Check its UTF-8 bytes against the expected input and look for an invisible trailing newline. Choose alphabet and padding according to the receiving interface.
Frequently asked questions
- Can I use Base64 to protect a secret?
- Base64 is a reversible representation. Anyone with the string can decode it with the right alphabet. Use your application’s normal secret storage and encryption mechanisms for confidential values.
- Can I decode an image with this tool?
- The decoder expects the resulting bytes to be UTF-8 text. Use a file-oriented decoder for image, archive or other binary data. If a source claims to contain text and decoding fails, check which character encoding the sender used.