Skip to content
Categories
Base64 Encode / Decode
Encode and decode text to and from Base64.
Overview
- Converts text into Base64 format (encode), or converts Base64-formatted text back into the original string (decode).
- Base64 represents binary data using only alphanumeric characters and a few symbols, and is widely used wherever data needs to be handled safely as text, such as API authentication headers or image data URLs.
- Base64 is encoding, not encryption, so converting to Base64 does not provide any confidentiality for the content.
Usage
- Enter the text you want to encode, or the Base64 string you want to decode, into the text area.
- Click the "Encode" or "Decode" button.
- The result is displayed below. Use the "Copy" button to copy it to the clipboard.
Example
Input
Hello, World!
Output
SGVsbG8sIFdvcmxkIQ==
Use Cases
- Encoding a "username:password" string for use in an API's Basic authentication header (Authorization: Basic ...)
- Decoding a Base64-encoded JWT payload or part of an API response locally to check its contents
- Trying out text encoding and decoding before embedding binary data such as an image as a Base64 data URL
FAQ
Can I encode multi-byte characters such as Japanese?
Yes. Text is encoded as UTF-8, so Japanese characters and emoji are handled correctly.
Is the text I enter sent anywhere?
No. All encoding and decoding happens entirely in your browser.
What happens if I decode an invalid Base64 string?
An error message "The Base64 format is invalid." is displayed.
Notes
- Base64 is not encryption. Anyone can decode it back to the original content, so it cannot be used to hide sensitive information.
- Encoding and decoding are done as UTF-8, so multi-byte characters such as Japanese text and emoji are handled correctly.
- When decoding, entering a string that is invalid as Base64 (wrong length, contains unusable characters, etc.) results in an error.
Related Tools
Encode and decode text to and from URL encoding.
Escape and unescape text for use in HTML.
Convert numbers between binary, octal, decimal, and hexadecimal.
Convert an image to a Base64 data URL, or restore an image from Base64.