OCXLY
OCXLY AI Labs · Developer Tools

Base64 Encoder / Decoder

Encode plain text or binary files to Base64, decode Base64 strings back to readable text — instantly, client-side only. Your data never leaves your browser.

Plain Text Input
Base64 Output
Options
Input 0 chars Output 0 chars
§ File

Encode a File to Base64

Drop a file here or click to browse
Images · PDFs · Text · Any format · Max 5 MB
What is it?

Base64 Explained

Base64 encodes binary data as ASCII text using 64 printable characters: A–Z, a–z, 0–9, + and /. Every 3 bytes of input become 4 characters of output, adding roughly 33% overhead. The = character is used for padding.

Base64 Encoder / Decoder infographic — how Base64 turns 3 input bytes into 4 ASCII characters, common uses, and the URL-safe variant.
Common uses

Where It's Used

Embedding images in HTML/CSS as data: URIs, encoding binary content in JSON payloads, MIME email attachments, HTTP Basic Auth headers (user:pass), and JWT token payloads are all Base64 encoded.

URL-safe variant

URL-Safe Mode

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _ and omits = padding — safe for query strings and JWT tokens.