Base64 Encoder
Convert any text into a Base64 string. Unicode characters such as Arabic or emoji are encoded correctly via UTF-8 before Base64. Useful for embedding data in URLs, emails or configuration files.
What each field means
Every input below changes the result in a specific way. This is what each one expects, what it starts at, and the range it accepts.
- Text to encode
Text that you supply. The calculator works on exactly what you type.
How to read your result
The calculator reports the figures below. The headline figure answers the question in the title; the rows underneath break it down so you can see what drives it.
- Base64 output
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
- Input length
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
- Output length
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
- Padding characters
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
- Padding characters
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
- Size growth
- This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
Quick reference
| Code | Meaning |
|---|---|
A-Z a-z 0-9 + / | The 64-character Base64 alphabet. |
= | Padding. One equals sign means the input length was not a multiple of three. |
== | Two padding characters, used when only one byte of input remains. |
+33% | Encoded output is roughly a third larger than the original input. |
UTF-8 | Non-Latin characters are converted to their UTF-8 bytes first, so Arabic text takes more bytes. |
What this means
Base64 represents binary data as 64 printable ASCII characters, so it survives text-only channels. Each group of 3 bytes becomes 4 characters.
How we calculate it
Formula
UTF-8 encode the string, then group bytes into 6-bit chunks mapped to A–Z a–z 0–9 + /.Worked example
Encode 'Hello world':
- 1Type or paste your text.
- 2The Base64 output updates live.
- 3Copy the encoded string.
Important assumptions
- Input is encoded as UTF-8, matching how most systems decode Base64.
Frequently asked questions
What is Base64 used for?
Embedding images in HTML or CSS, passing data in URLs, storing binary in JSON, and sending files as text over email.
Does Base64 support Arabic and emoji?
Yes, when the text is UTF-8 encoded first, which this tool does automatically.
Related tools
Base64 Decoder
Decode Base64 strings back to readable text.
URL Encoder
Encode text for safe use inside URLs and query strings.
JSON Formatter
Format, minify and validate JSON with one click.
Hash Generator
Generate MD5, SHA-1 and SHA-256 hashes of any text.
Regex Tester
Test regular expressions against text with live matches.
URL Decoder
Decode percent-encoded URLs back to readable text.