Encode text to Base64
Encode text to Base64 in your browser with correct UTF-8 handling and an optional URL-safe alphabet. Instant, offline-capable, nothing uploaded.
Type or paste text and get its Base64 form as you type. Multi-byte characters are handled correctly: the text is encoded to UTF-8 bytes first, so CJK text, emoji and accented letters encode to the same bytes every server-side encoder (Python, Node, Java) would produce — not the broken result you get from tools that base64 the raw UTF-16.
Need the alphabet that survives URLs and filenames? Tick URL-safe and + and / become - and _ — the base64url variant used by JWT segments, URL tokens and filename-safe identifiers.
Common uses: building Basic auth headers (encode user:password), data URIs for inline images, quick payload inspection on the JWT decoder, or turning binary-ish text into something an XML or JSON string can carry. Encoding runs locally in your tab.
Frequently asked questions
- How are emoji and non-Latin scripts encoded?
- Correctly — the text is converted to UTF-8 bytes before encoding, matching what Python's base64.b64encode(s.encode()) and Node's Buffer.from(s).toString('base64') produce for the same string.
- What is URL-safe Base64?
- The same encoding with - and _ in place of + and /, and usually without = padding. It's what JWTs use for their header and payload segments, and it can be dropped into URLs and filenames without escaping.
- Is there a size limit?
- Only your device's memory — encoding runs in your browser tab with no server round-trip, so megabytes of text convert instantly.