Base64 Encode
Encode plain text — including emoji and non-Latin scripts — into Base64, the format used to carry arbitrary data inside URLs, JSON, JWTs, data URLs, and HTTP headers without breaking the surrounding syntax.
- Published
- Last reviewed
Tool Summary Answer Block
This tool accepts structured input and returns deterministic output in the browser with no server upload.
- Tool name
- Base64 Encode
- Input intent
- Provide source content to transform, validate, or analyze.
- Output intent
- Receive normalized output suitable for copy, reuse, or debugging.
- Example input
- Hello, world
- Example output
- SGVsbG8sIHdvcmxk
Already have Base64? Switch to Base64 Decode
Tool Introduction
Encode plain text — including emoji and non-Latin scripts — into Base64, the format used to carry arbitrary data inside URLs, JSON, JWTs, data URLs, and HTTP headers without breaking the surrounding syntax.
Tool Overview
Base64 represents arbitrary bytes using only 64 printable ASCII characters (A–Z, a–z, 0–9, plus + and /, with = padding). It exists because many transports — HTTP headers, JSON strings, URLs, email bodies — assume printable text and will mangle raw bytes. Encoding makes any input safe to drop into those contexts; decoding reverses it exactly. This encoder is UTF-8 safe, so accents, emoji, and CJK characters round-trip correctly instead of throwing the way a naive btoa() does. Toggle URL-safe to emit the base64url alphabet (- and _ instead of + and /, no padding), which is what JWTs and query-string parameters use. Everything runs locally in your browser, so even sensitive text never leaves your device. Remember: Base64 is encoding, not encryption — anyone with the string can decode it.
Use Cases
- Embed an image, font, or small file inline as a data: URL in CSS or HTML
- Put binary or special-character data inside a JSON field or HTTP header safely
- Build the header and payload segments of a JWT (base64url)
- Encode credentials for an HTTP Basic Authorization header
- Move a config blob through a system that only accepts plain ASCII text
Input/Output Examples
Hello, world
SGVsbG8sIHdvcmxk
café 👋
Y2Fmw6kg8J+Riw==
subjects?value=a/b+c (URL-safe)
c3ViamVjdHM_dmFsdWU9YS9iK2M
FAQ
Does Base64 encrypt or secure my data?+
Why is the output about a third larger than the input?+
What is the difference between Base64 and base64url?+
Can it handle emoji and non-English text?+
Is my text uploaded anywhere?+
Explore More Tools
Discover related utilities in the Encoding category below.
Related tools
Handpicked utilities you might find useful