Base64 Encoder
Encode text or a file to Base64, including the URL-safe variant used in tokens and query parameters.
Your data stays on your device
Input — Text
- characters
- 0
- lines
- 0
- size
- 0 B
Output — Base64
- characters
- 0
- lines
- 0
- size
- 0 B
Options
Replaces + and / with - and _, which is what JWTs and URLs use.
About this tool
Base64 represents arbitrary bytes using 64 printable ASCII characters. It exists so binary data can travel through channels that only accept text — email bodies, JSON string fields, data URIs and HTTP headers.
Encoding is not encryption. Anyone can decode Base64 instantly, so it protects nothing. Its only job is safe transport, and the output is roughly one third larger than the input.
How to use this tool
- Type or paste text, or upload a file to encode its bytes.
- Choose the standard alphabet or the URL-safe variant that replaces + and / with - and _.
- Optionally enable line wrapping at 76 characters for MIME compatibility.
- Press Encode and copy the result.
Key features
- UTF-8 text encoding with full Unicode support
- File encoding for any binary content
- Standard and URL-safe alphabets
- Optional padding removal
- Optional 76-character line wrapping for MIME
- Data URI output with a detected MIME type for uploaded files
Example
Input — Text
Convert2JSONOutput — Base64
Q29udmVydDJKU09OGood to know
- Base64 provides no confidentiality. Never use it as a substitute for encryption.
- Output is about 33 percent larger than the input, which matters for large payloads.
- Very large files are limited by browser memory since encoding happens entirely on the client.
Frequently asked questions
When should I use the URL-safe alphabet?
Whenever the value goes into a URL path, a query parameter or a JWT. The standard + and / characters have reserved meanings in URLs and would otherwise need percent-encoding.
Why does my output end with = signs?
Padding brings the output to a multiple of four characters. Some systems omit it; you can disable padding if your consumer expects the unpadded form.
Does it handle emoji and Korean text?
Yes. Text is encoded as UTF-8 bytes first, so any Unicode character round-trips correctly.
Is my file uploaded to a server?
No. The file is read with the browser FileReader API and encoded locally. Nothing is transmitted.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.