Base64 Encode & Decode - Base64 Converter Online
Encode and Decode Base64 Text
In Encode mode, type or paste text and get standard Base64 (with
+, / and = padding). The text is
converted to UTF-8 bytes first, so accented letters and emoji round-trip
correctly; é encodes to w6k=. In Decode mode,
paste Base64 and get the original text back. Whitespace and line
breaks are ignored, so wrapped Base64 from emails or PEM files decodes
without cleanup. Everything runs in your browser.
Examples
Helloencodes toSGVsbG8=.-
user:passencodes todXNlcjpwYXNz, which is what goes afterAuthorization: Basicin an HTTP Basic Auth header. Decode a header value to check which credentials a client is sending. - The middle part of a JWT decodes to JSON claims. The JWT decoder does this for all three parts and checks expiry too.
Gotchas
- Kubernetes Secrets. Values under
data:are Base64. Encode without a trailing newline:echo -n secret | base64, notecho secret | base64, or your password will end in\n. - Data URIs. Remove the
data:image/png;base64,prefix before decoding. Image data is binary, so it will not decode to readable text here; use the image to Base64 converter for images. - btoa in JavaScript.
btoa("é")works but encodes the Latin-1 byte, giving6Q==rather than the UTF-8w6k=, andbtoa("€")throws. Encode to UTF-8 bytes first withTextEncoder, which is what this tool does.
When to Use Base64
Base64 exists to move bytes through channels that only accept text: email attachments (MIME), JSON fields holding binary data, small images inlined in CSS, and keys in PEM files. It is not compression (it makes data bigger) and not protection. To check data integrity, use a hash; to put text in a URL, use URL encoding.
Related Tools
JWT Decoder
Decode JSON Web Tokens and inspect header, payload and signature.
URL Encode / Decode
Percent-encode or decode URLs and query-string parameters safely.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
MD5 Hash Generator
Generate MD5 hashes from text for checksums and legacy systems.