Skip to content

Encode text to Base64

Turn any text—including Chinese and emoji—into Base64 using UTF-8. Optional URL-safe mode replaces +/ with -_ for links and tokens.

Need to decode Base64 → text?

Examples

InputOutput
HiSGk=ASCII / Latin
你好5L2g5aW9Chinese with UTF-8

FAQ

How do I encode Chinese text to Base64?
Paste the text, keep UTF-8 (default), and convert. Each character becomes the correct UTF-8 bytes before Base64 encoding.
When should I use URL-safe Base64?
When the result goes into a URL, filename, or token where + and / can break. Enable URL-safe to use - and _ instead.
Why is there an equals sign at the end?
Padding (=) fills the last block to a multiple of 4 characters. Some systems omit it; decoding here still works either way.

Related tools

Text to Base64 Encoder - UTF-8 Online