Base64 Encoder
Paste text or upload a file and get the Base64-encoded string instantly.
Paste text and click Encode to get its Base64 string: Hello, World! becomes SGVsbG8sIFdvcmxkIQ==.
Use the Base64 Encoder
Input
Base64 Output
Quick answer
Paste text and click Encode to get its Base64 string: Hello, World! becomes SGVsbG8sIFdvcmxkIQ==. Every 3 bytes turn into 4 characters, so the output is about a third longer, padded with = at the end. Pick a file instead to encode an image or any other file.
Examples
| Input | Base64 output |
|---|---|
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
| Hi | SGk= |
| user:pass | dXNlcjpwYXNz |
| café | Y2Fmw6k= |
| <<???>> | PDw/Pz8+Pg== |
| <<???>> (URL-safe) | PDw_Pz8-Pg== |
Paste your text, then click Encode.
Summary
Paste text or upload a file and get the Base64-encoded string instantly.
How it works
- Paste text into the input area or click "Choose file" to upload a binary file.
- Select Standard or URL-safe alphabet as needed.
- Click Encode to convert the text. A file is encoded as soon as you pick it, so choose the alphabet first.
- Copy the Base64 output with the Copy button.
Use cases
- Embedding images as data URIs in CSS
- Encoding credentials for HTTP Basic Auth headers
- Passing binary data in JSON API payloads
Frequently Asked Questions
Last updated: 2026-05-29 · Reviewed by Nham Vu