How to use the Base64 Encoder / Decoder
- Choose “Encode text to Base64” or “Decode Base64 to text”.
- When encoding, choose whether you need the URL-safe alphabet and “=” padding.
- Type or paste your input. The result and its size in bytes update as you type.
- Copy the result, or swap input and result to check the round trip.
Examples
Hello, café!
SGVsbG8sIGNhZsOpIQ==
😀
8J-YgA
SGVsbG8g d29ybGQ=
Hello world
Encoded size
The figure under the editors shows the size of your text in UTF-8 bytes. Plain English letters take one byte each, accented Latin letters usually two, most Asian characters three, and emoji four. The Base64 output is always about four characters for every three bytes, rounded up.
Padding
Base64 works in groups of three bytes. When the data does not divide evenly, the output is padded with one or two “=” signs so its length is a multiple of four. Some formats, such as JWT, drop the padding; turn off “Keep = padding” for those. The decoder works either way.
Related developer tools
Base64 is not the same as URL encoding. To make text safe for a link while keeping it readable, use the URL Encoder. If the decoded text is JSON, such as a JWT payload, format it with the JSON Formatter.
Common uses
- Reading Base64 values in API responses, JWT payloads, emails and configuration files.
- Encoding text for HTTP Basic authentication headers or data: URLs.
- Storing text with special characters in systems that only accept ASCII.
- Checking whether a Base64 string contains readable text.
Limitations
- This tool works with text. Files and binary data such as images or PDFs are detected and reported but not displayed.
- Text is always encoded as UTF-8. Base64 that was made from text in another encoding (such as Windows-1252) cannot be decoded as text.
- Base64 is an encoding, not encryption. Anyone can decode it, so never rely on it to hide passwords or secrets.
- Very large inputs (tens of megabytes) may be slow on phones.