About the Base64 Encoder
Base64 represents data using 64 safe characters: AβZ, aβz, 0β9, plus + and /. It is used in email attachments, data URLs, JSON web tokens, HTTP authentication headers and configuration files. Every 3 bytes of input become 4 characters of output, so encoded text is about a third larger.
This encoder first converts your text to UTF-8 bytes, so accented letters, non-Latin scripts and emoji all work. Many simple encoders fail on these. Tick URL-safe output to produce the Base64URL variant used in JWTs and web addresses. Remember that Base64 is an encoding, not encryption: anyone can decode it.
How to use it
- Paste your text.
- Choose standard or URL-safe output.
- Click Encode to Base64 and copy the result.
Example
Hello, world! π
SGVsbG8sIHdvcmxkISDwn5GL
When to use it
- Preparing values for HTTP Basic authentication headers.
- Embedding text in JSON, XML or data URLs.
- Creating test payloads for APIs and JWTs.
- Storing configuration values that contain special characters.
Frequently asked questions
Is Base64 encryption?
No. Base64 only changes how data is written. Anyone can decode it, so never use it to protect secrets.
Why does my output end with = signs?
Padding characters make the output length a multiple of four. URL-safe mode removes them.
Can I encode files or images?
This tool encodes text only. Files and images need a dedicated file-to-Base64 converter.
Is the text I enter kept private?
Yes. The Base64 Encoder runs entirely in your web browser, so your text is never uploaded to or stored on our servers. Like most free websites, TextForge shows ads from Google, which may use cookies. See our Privacy Policy for details.