HomeTextDataDeveloperFilesMediaUtilities

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

Drop a file here or click to select
Input (text)0
Output (Base64)0

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.