🏠 Home πŸ”§ Tools πŸ“ Blog πŸ‘‹ About πŸ“¬ Contact ⚑ All Free Tools
πŸ” Developer Tools β€” Free & Instant

Free Base64 Encoder & Decoder

Encode text, URLs and files to Base64 β€” or decode Base64 strings back to plain text and binary files. Supports UTF-8, URL-safe Base64, image preview and chunked output.

πŸ”‘ Text Encode/Decode πŸ–ΌοΈ Image Preview πŸ“ File Upload πŸ”— URL-Safe Mode πŸ“ Chunked Output πŸ“Š Stats πŸ’Ύ Download
β€”
πŸ“₯ Input
πŸ“€ Base64 Output

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters using a 64-character alphabet: A–Z, a–z, 0–9, + and /, with = as padding. Every 3 bytes of binary data are encoded as 4 Base64 characters, resulting in approximately 33% size overhead. Base64 is defined in RFC 4648 and is widely used in web development, email systems and security protocols.

Base64 does not encrypt data β€” it only encodes it. Anyone who receives a Base64 string can decode it back to the original data instantly. It is used purely to safely transmit binary data through channels that only support text, such as HTTP headers, JSON payloads, XML documents and email bodies.

Standard Base64 vs URL-Safe Base64

Standard Base64 uses + and / characters which have special meaning in URLs and file systems. URL-safe Base64 (Base64url, defined in RFC 4648 Β§5) replaces + with - and / with _, making the output safe for use in URLs, filenames and HTTP query parameters without percent-encoding. URL-safe Base64 is used in JWT tokens (JSON Web Tokens), OAuth tokens, and any web application that passes Base64 data in URLs.

Common Base64 Use Cases in Web Development

How to Decode a Base64 String in Code

Decoding Base64 is natively supported in every major programming language. In JavaScript (browser): atob('SGVsbG8=') returns 'Hello'. In Node.js: Buffer.from('SGVsbG8=', 'base64').toString('utf-8'). In Python: import base64; base64.b64decode('SGVsbG8='). In PHP: base64_decode('SGVsbG8='). In cURL (command line): echo 'SGVsbG8=' | base64 --decode.