Base64 Encode/Decode
Encode or decode Base64 strings.
- Runs in your browser
- No signup
How to use Base64 Encode/Decode
Choose text or file
Type or paste text, or switch to File mode to encode any file.
Encode or decode
Results update in real time. Enable URL-safe output or 76-character line breaks when you need them.
Copy the result
Copy the Base64 string or the decoded text. Image files also show a preview.
How to encode and decode Base64
Base64 represents binary data using 64 plain text characters, so it can travel safely through systems built for text: JSON payloads, email, HTTP headers, data URIs and configuration files. Base64 Encode/Decode converts text and files in both directions, in real time, in your browser.
Base64 is encoding, not encryption
Anyone can decode Base64 instantly, so it provides no security. It is used to make data transportable, not secret. Never rely on it to hide passwords or tokens; for integrity checks use the Hash Generator, and for real secrecy use proper encryption.
Options
Three options cover most needs:
- URL-safe Base64 replaces + with - and / with _, and drops the = padding, so the string can be used in URLs and file names.
- Line breaks every 76 characters, the MIME format used for email attachments.
- File mode encodes any file, such as a PDF, font or image, into a Base64 string.
Size and Unicode
Base64 output is about 33 percent larger than the input. Text is encoded as UTF-8 first, so emoji and non-English characters round-trip correctly. For images specifically, Image to Base64 can also produce ready-made HTML and CSS snippets.