Base64 Encoder
Make a standard or URL-safe Base64 string from text or a file.
Paste text or Base64, or choose a file to encode.
Example · Hello in Base64
Result
5 bytes encoded as Base64.
Showing the first 2,048 characters. Copy or download the full result.
Processed on this device — nothing is uploaded
What you can do here
- Encode UTF-8 text and emoji
- Standard and URL-safe alphabets
- Encode files up to 5 MiB
- Copy or save Base64 text
How do you encode text or files as Base64?
To encode text as Base64, leave the tool in Encode text mode and paste your text. The encoder converts it to UTF-8 bytes first, which preserves accented letters and emoji. Choose Encode file to use the actual bytes of a file instead. Standard Base64 adds padding where needed. The URL-safe option uses a different alphabet and leaves off the padding.
You can copy the Base64 string or download it as a text file for use elsewhere.
Key facts
- Price
- Free
- Sign-up
- None
- Upload
- None — runs on your device
- Limits
- 8 MiB pasted UTF-8 text · 5 MiB per selected file
- Works with
- UTF-8 text · Standard or URL-safe Base64 · Local files
- Output
- Base64 text · Decoded UTF-8 text or downloaded bytes · Supported raster image previews
- Updated
How do you make a Base64 string?
- Enter text or select a file
Paste text into the box or select Encode file and pick a file up to 5 MiB.
- Choose the alphabet
Select Standard for Base64 or URL-safe for Base64url.
- Copy or save the string
Copy the encoded string or download it as a text file.
Base64 encoding examples
Base64 groups three bytes into four symbols. Standard Base64 uses + and /, with = padding as needed. Base64url uses - and _ instead. The URL-safe encoder leaves off padding, and the decoder accepts it either way.
| Input bytes | Standard | URL-safe |
|---|---|---|
| Hello (UTF-8) | SGVsbG8= | SGVsbG8 |
| 😀 (UTF-8) | 8J+YgA== | 8J-YgA |
Frequently asked questions
What is Hello encoded in Base64?
Hello in UTF-8 becomes SGVsbG8= with standard padding. Without the padding, the same bytes are represented by SGVsbG8.
Can I turn an image into a Base64 string?
Yes. Select Encode file and choose the image. The output contains the encoded image bytes. It can be used where raw Base64 is expected.
Why is the Base64 output bigger than the original file?
Base64 uses four symbols for each group of three bytes. When saved as text, it takes about a third more space for large files.
Does selecting a file here upload it?
Your browser reads the file locally and prepares a text download on this device.
Popular conversions
Related tools
About this tool
Made by ZirkoMirko. Last updated .
Check it yourself in your browser’s Network panel while using the tool. How we handle your data.
Sources
- RFC 4648, Base64 and Base64url (checked )