Base64 encoder / decoder
Convert text to Base64 or decode Base64 back to plain text. Runs entirely in your browser.
What is Base64 encoding?
Base64 is an encoding scheme that converts binary data β or any text β into a string of 64 safe ASCII characters (AβZ, aβz, 0β9, +, /). It's not encryption: anyone can decode it. Its purpose is to safely transmit data in contexts that only handle text, such as email attachments, data URLs, and HTTP headers.
You'll commonly encounter Base64 in API authentication tokens (Basic Auth), JWT tokens, and inline images in HTML (src="data:image/png;base64,β¦").
Base64 encoded strings are easy to spot β they typically end with one or two = padding characters and consist entirely of alphanumeric characters plus + and /. The encoded output is always approximately 33% larger than the original input, because 3 bytes of binary data are represented as 4 characters.
Frequently Asked Questions
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption. It transforms data into a different representation, but provides zero security β anyone who receives a Base64 string can decode it instantly. Never use Base64 to protect sensitive information. For actual security, use proper encryption algorithms like AES.
What is URL-safe Base64?
Standard Base64 uses + and / characters, which have special meanings in URLs. URL-safe Base64 replaces these with - and _ instead. JWTs (JSON Web Tokens) use URL-safe Base64. If you're seeing decoding errors, check whether your source uses standard or URL-safe encoding.
Where is Base64 used in practice?
Common uses include: encoding images or files as data URIs in HTML/CSS, HTTP Basic Authentication headers (username:password encoded as Base64), embedding binary data in JSON payloads (which only support text), and email attachments (MIME encoding). Many API credentials are also delivered as Base64-encoded strings.
Related tools