Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to plain text. Supports Unicode, emoji, and non-Latin characters.
What Is Base64 Encoding and When Should You Use It?
Base64 encodes binary data as 64 printable ASCII characters (A–Z, a–z, 0–9, +, /, padding =). Three bytes become four characters (~33% size overhead) so binary can travel inside JSON, email, or data URIs.
Common uses: small images in CSS/HTML (data URIs), binary fields in JSON APIs, MIME attachments. HTTP Basic also Base64-encodes username:password in headers.
Base64 is not encryption — anyone can decode it instantly. Never use it to hide secrets; use real encryption or hashing. This tool is for transport encoding and debugging only.
Debugging tip: paste suspected Base64 into both encode and decode panes—if decode fails, the string might be URL-safe variant (– and _) or missing padding.
Related tools
These free tools pair well with this page — open them in a new tab to finish your workflow.
Frequently Asked Questions
What is Base64?
Base64 is an encoding scheme that converts binary data (or text) into a string of ASCII characters. It is commonly used to transmit data in contexts that only support text, like email attachments, data URIs in CSS/HTML, or JSON payloads.
Does Base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone who receives a Base64 string can trivially decode it. Do not use Base64 to hide sensitive information — use proper encryption instead.
What is the size overhead of Base64?
Base64 encoding increases data size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. This is an important consideration when embedding large images or files as Base64 strings.
What is URL-safe Base64?
Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe to include in query strings and path parameters without percent-encoding.
Can I encode binary files with this tool?
This tool encodes and decodes text (UTF-8). For binary files such as images or PDFs, you would need a tool that reads the raw bytes before encoding. Pasting binary data as text may produce incorrect results.
What does 'invalid Base64' mean?
A valid Base64 string contains only A–Z, a–z, 0–9, +, /, and = (padding). If the string contains other characters, or the length is not a multiple of 4 after accounting for padding, decoding will fail.
Is Base64 the same as ASCII encoding?
No. ASCII is a character encoding standard that maps characters to byte values. Base64 is a binary-to-text encoding scheme. The two are unrelated, though Base64 output happens to consist entirely of ASCII characters.