Base64 Encode / Decode
Encode text or files to Base64 and decode Base64 strings â all in your browser
About Base64 Encoding & Decoding
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format. It's widely used in web development, email encoding (MIME), data URLs, and API authentication. Our free online Base64 encoder/decoder handles both plain text and file encoding instantly.
What is Base64 Used For?
- Data URLs â Embed images directly in HTML/CSS as
data:image/png;base64,... - API Authentication â Basic Auth headers encode credentials as Base64
- Email Attachments â MIME protocol uses Base64 for non-text content
- JWT Tokens â JSON Web Tokens use Base64url encoding
- Data Storage â Store binary data as text in databases or JSON
How to Encode Text to Base64
Type or paste any text into the input area and click Encode to Base64. The tool supports full Unicode including international characters, emojis, and special symbols. The encoded output can be used directly in your code or configuration.
How to Decode Base64
Paste a Base64-encoded string into the input area and click Decode from Base64. The tool validates the input and shows a clear error if the string is not valid Base64. This is useful for debugging API responses, reading encoded configuration values, or decoding JWT payloads.
File to Base64
Use the file input to encode any file (image, PDF, document) to a Base64 string. This is useful for embedding small images as data URLs in CSS or HTML, or sending binary data through text-based APIs.