Base64 decoder and encoder online
Convert text to Base64 and back for data URLs, basic auth headers, and quick debugging. One tool for both directions—no install required.
What is Base64 used for?
Base64 represents binary data as ASCII text. You will see it in data URLs for small images, in email and MIME attachments, and when APIs return binary payloads as text. It is not encryption—anyone can decode it—so never rely on Base64 alone to protect secrets.
Encode and decode in JavaScript
Browsers expose btoa and atob for binary strings where each character is in the Latin-1 range. For Unicode strings, you need a UTF-8 conversion step first, which trips many people up.
// Latin-1 safe
btoa("hello"); // aGVsbG8=
// Unicode: convert to UTF-8 bytes first (e.g. TextEncoder)
// or use our tool to avoid boilerplateDecoder vs encoder: same tool
Whether you need a Base64 decoder for a JWT segment or an encoder for a config blob, use the same page: paste the input and choose the direction. For images, see also our image to Base64 helper.
Privacy-friendly Base64 online
Credentials and tokens should not be pasted into untrusted websites. Developer Friend runs the conversion locally in your tab so sensitive strings are not uploaded as part of the tool workflow.