Base64 Encode / Decode
Encode text to Base64 or decode Base64 to text
Enter text and click Encode/Decode to convert
About This Tool
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is commonly used to encode data for transmission over media designed to handle text, such as embedding images in HTML or CSS, encoding authentication credentials in HTTP headers, transmitting binary data in JSON or XML payloads, and attaching files in email messages using the MIME standard. Our free online Base64 encoder and decoder supports full UTF-8 encoding, so you can safely convert strings containing special characters, emojis, and multibyte characters. Base64 is also widely used in API authentication schemes like Basic Auth and for encoding binary data in data URIs. Simply paste your text or Base64 string and get instant results.
How to Use
- To encode text to Base64, paste your plain text into the input field. The tool supports any UTF-8 characters including emojis, accented letters, and symbols.
- The encoded Base64 string will appear in the output area immediately. Click the copy button to copy it to your clipboard for use in your code, HTML, or API request.
- To decode a Base64 string, paste the encoded string into the input area and switch to decode mode. The original text or binary data will be displayed in the output.
- Use the file upload option to encode files such as images or documents into Base64 strings, which is useful for embedding assets directly into HTML, CSS, or JSON.
Frequently Asked Questions
Examples
Encode API Credentials
Create a Basic Auth header by encoding username:password
dXNlcjpwYXNzd29yZA==Embed Image in HTML
Convert a small image to Base64 for inline embedding
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==Decode JWT Payload
Extract the middle section of a JWT token to view claims
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ