Base64 Encoder & DecoderPrivacy: All processing runs locally
Encode text and files to Base64, decode Base64 to text or files, validate Base64 strings, and convert Base64URL β entirely in your browser.
Validation
How Base64 Works
Base64 encodes binary data (bytes) into a text string using 64 safe characters: AβZ, aβz, 0β9, + and /. Padding with = ensures the output length is a multiple of 4.
Base64 vs Base64URL
Standard Base64 uses + and /. Base64URL replaces them with - and _, making it safe for URLs, filenames, and URL query parameters. Base64URL often omits the = padding.
JWT (JSON Web Token) segments use Base64URL, not standard Base64. Use the JWT Decoder to inspect JWT payloads.
Text, UTF-8 Bytes, and Base64
Text is first converted to bytes using UTF-8 encoding (via TextEncoder), then those bytes are Base64-encoded. Characters like ΓΌ (2 bytes) and π (4 bytes) are correctly handled. This tool uses modern TextEncoder/TextDecoder β no deprecated escape() or unescape() functions.
File to Base64 and Data URLs
You can encode local files to Base64 using the file drop area. The result can be output as raw Base64 or as a Data URL (data:<mime>;base64,<payload>). Data URLs are useful for embedding images in HTML/CSS or sending binary data in JSON payloads.
Validate Base64 Input
Use the Validate tab to check whether a string is valid Base64, Base64URL, or a Data URL. The validator reports the detected alphabet, padding status, invalid characters, decoded byte count, and UTF-8 validity.
Base64 Is Not Encryption
Base64 provides no security β anyone can decode it. It's used for transport (email attachments, data URIs, API payloads), not for protecting data. Use proper encryption for sensitive data.