Base64 Encode & Decode

Encode text or files to Base64 and decode Base64 strings. UTF-8 safe. URL-safe mode available. Runs entirely in your browser.

Runs entirely in your browser. Your input never leaves this page.
Input
Output

About Base64 Encoding

Base64 encodes binary data into printable ASCII characters using 64 symbols (A–Z, a–z, 0–9, +, /). It's used everywhere: JWTs, data URIs, email attachments, HTTP Basic Auth headers, and API payloads.

Standard btoa only handles latin-1 bytes. This tool uses TextEncoder to convert UTF-8 strings to bytes first, making it safe for emoji, accented characters, and CJK text. URL-safe mode replaces + with -, / with _, and strips padding — safe for URLs and filenames.

Text Encoding
UTF-8 safe encoding using TextEncoder. Handles full Unicode.
File Encoding
Any file type — images, PDFs, binaries — encoded via FileReader API.
URL-Safe Mode
No +/= characters. Safe for query strings, JWTs, and filenames.