Base64 Encoder
Turn text or encoded bytes into Base64. Pick the input encoding and the alphabet your target system expects.
Rated 4.8 out of 5 based on 1204 reviews
How to encode Base64
- Paste text, or paste hex / Base64 if the data is already encoded.
- Set Input encoding. UTF-8 is correct for normal text.
- Choose a format. MIME wraps lines; URL-safe uses - and _; IMAP uses a comma in place of /.
- Copy the output, or decode it later with the Base64 decoder.
Base64
Binary-to-text encoding (RFC 4648 and related profiles)
| RFC 4648 | A-Z, a-z, 0-9, +, / with = padding |
|---|---|
| URL-safe | - and _ in place of + and / |
| MIME (RFC 2045) | Same alphabet, wrapped at 76 characters |
| UTF-7 and IMAP | RFC 2152 and RFC 3501. These drop padding and change two alphabet characters |
| Not encryption | Anyone can decode the output |
What Base64 is
Base64 represents bytes as ASCII so they can travel through systems that expect text (email, JSON strings, data URLs). It expands size by about 33%. It is an encoding, not a cipher.
Need the original bytes back? Use the Base64 decoder. For query strings, use URL encoding instead. More converters are in encoding tools.
Formats this page supports
Input encoding converts the paste into bytes, then those bytes are written with the selected alphabet. RFC 4648 is the usual form. URL-safe is for tokens in URLs. MIME inserts a line break every 76 characters. UTF-7 and IMAP drop padding and change two of the alphabet characters. A custom alphabet must be 64 unique characters.