Round-trip a UTF-8 string through Base64

Choose Encode and enter Hello, 世界! with no trailing newline. The expected result is SGVsbG8sIOS4lueVjCE=. Switch to Decode and paste that result to recover the original text.

This tool treats strings as UTF-8. If you are inspecting a file or arbitrary bytes, use the Base64 file tool instead: not every byte sequence is valid UTF-8 text. A decoding error can therefore mean invalid text, even if the Base64 characters themselves are valid.

Hello, 世界!
→ SGVsbG8sIOS4lueVjCE=

Where this workflow can go wrong

Base64 does not hide a password or API key. Anyone can decode it. Standard Base64 uses + and /; URL-safe Base64 uses - and _. This string tool handles standard Base64 and does not automatically normalize JWT segments or strip data: URL prefixes.

Check your result

Compare the decoded text character by character, including spaces and line endings. A trailing newline changes the encoded output. Do not repeatedly decode a value merely because the result happens to resemble Base64.

Read the full guide · Technical reference

About this tool

Base64 String Encoder/Decoder converts text to/from Base64 encoding. Base64 encodes binary data as 64 printable ASCII characters, widely used for transmitting binary data in text environments like URLs, JSON, XML.

How to use

Encode: enter text, get Base64 string. Decode: enter Base64, get original text. Supports UTF-8 for multi-byte characters.

Tips & Notes

Base64 is encoding not encryption - provides no security. URL-safe variant uses - and _ instead of + and /. Common in API data handling.