Base64 Encoder
Convert text into Base64, or into URL-safe Base64 for tokens and query strings.
0 characters
0 characters
Processed locallyFiles and text are processed in your browser and are not uploaded to our servers.Learn more
Need the opposite? Base64 Decode
How to encode text to Base64
- 01
Enter your text
Type or paste the text to encode.
- 02
Choose encoding and alphabet
UTF-8 is the default. Turn on URL-safe alphabet if the result goes into a URL or token.
- 03
Encode and copy
Copy the Base64 string or download it.
Standard or URL-safe
- Standard Base64 uses A–Z, a–z, 0–9, + and /, and is padded with = to a multiple of four characters.
- URL-safe Base64 (Base64URL) replaces + with - and / with _ and leaves out the padding, as used in JSON Web Tokens.
Text is converted to bytes first
Base64 encodes bytes, not characters. The text is first turned into bytes using the encoding you pick, so “é” encodes differently in UTF-8 (w6k=) than in Latin-1 (6Q==).
Base64 is an encoding, not encryption: anyone can decode it again.
Related tools
Frequently asked questions
Can I encode a file or image to Base64?
Not with this tool; it encodes text you type or paste.
Why does Base64 end with = signs?
Base64 output is grouped in blocks of four characters. The = signs pad the last block when the input length is not a multiple of three bytes.
Is Base64 secure?
No. Base64 makes data safe to transport as text, but it does not hide it. Do not use it to protect passwords or secrets.
How do I decode Base64?
Switch Mode to Decode, or use the Base64 Decoder page.