base64-converter

Encode text to Base64, or decode Base64 back to plaintext. Handles UTF-8 correctly (accents, emoji, non-Latin scripts) and supports the URL-safe variant used in JWTs and query strings.

client-side only UTF-8 safe URL-safe variant
input
Drag & Drop a file here to convert to Base64, or click to upload.
output
Result appears here.

// UTF-8 handling

The browser's built-in btoa()/atob() only handle Latin-1 (single-byte) text and throw on anything outside that range — meaning accented characters, emoji, or non-Latin scripts break them directly. This tool encodes text as UTF-8 bytes first, then Base64-encodes those bytes, matching how Convert.ToBase64String(Encoding.UTF8.GetBytes(...)) behaves in .NET — so text round-trips correctly regardless of character set.

// when you need the URL-safe variant