Base64 Encode
Encode any text — plain text, JSON, XML, YAML, Gujarati or emoji — to Base64 using UTF-8, so it can travel safely in URLs, headers, data URIs or config files. Runs in your browser.
Suggested tools
About Base64 Encode
Base64 Encode converts text into Base64 — the encoding used for data URIs, email attachments (MIME), HTTP Basic authentication headers, Kubernetes secrets and binary data inside JSON or XML. It works for any text: plain text, JSON, XML, YAML, Gujarati, Hindi and emoji.
Text is encoded as UTF-8 first, the standard that every modern decoder expects. It runs entirely in your browser, so nothing you paste is uploaded.
How to use Base64 Encode
- Paste your text, upload a text file or click Sample.
- Press Convert.
- Copy the Base64 output.
Key features
- UTF-8 encoding — non-English text and emoji safe
- Works for JSON, XML, YAML and plain text
- Standard Base64 alphabet with = padding
- Decode with Base64 Decode
Example
Text is encoded as UTF-8 first, so Gujarati letters survive the round trip.
Hello, નમસ્તે!
SGVsbG8sIOCqqOCqruCquOCrjeCqpOCrhyE=
When to use Base64 Encode
- Creating a value for a Kubernetes Secret or an HTTP Basic Authorization header.
- Embedding small text payloads in JSON or XML safely.
- Preparing data for systems that only accept ASCII text.
Tips and common problems
- Base64 is not encryption — anyone can decode it.
- Watch for trailing new lines; "hello" and "hello" + newline encode differently.
- For use in URLs, URL-encode the result or use the URL-safe alphabet.
Frequently asked questions
No. Base64 is an encoding that anyone can reverse instantly. Never use it to hide passwords or secrets.
Base64 uses 4 characters for every 3 bytes, so output is about 33% larger.
It uses the standard alphabet (+ and /). For use inside URLs, replace + with - and / with _, or URL-encode the result.
Guides
- Base64 Explained — Base64 explained for beginners: what it is, why it exists, where it is used (data URIs, JSON, email), and when you should and should not use it.