Step-by-step
- Open the Base64 tool and paste the text you want to encode.
- Choose the encode option and read the result.
- Copy the Base64 string. A trailing = or == is padding and is normal.
- If the string goes into a URL, use the URL-safe form, which replaces + and / with - and _ and often drops the padding.
- Decode the result once to confirm that it matches your original text.
How Base64 works
Base64 reads the input three bytes at a time and writes four characters. This is why the encoded text is about 33 percent larger than the original. When the input length is not a multiple of three, the output is padded with one or two = characters.
Text with accents, emoji or non-Latin scripts
Base64 encodes bytes, so text must first be converted to bytes, normally with UTF-8. Some simple encoders only handle Latin-1 text and fail on characters such as emoji. Make sure the tool and the system that decodes the string both use UTF-8.
Common uses
Typical uses are data URLs for small images, binary values inside JSON, and the credentials in an HTTP Basic authentication header. Base64 does not protect those values, so never treat it as a way to hide a password.
Finish the task with DevUtilityKits
Use the relevant online utility, check the result, and continue with your development workflow.
Open Base64 Encoder and Decoder →Open URL Encoder →