← Home / Base64 & URL Encoder / Decoder
100% Client-Side In-Browser Processing (Zero server transmission)

Base64 & URL Encoder / Decoder

Convert raw text or encoded strings to Base64 and URL-encoded formats with complete UTF-8 Unicode character support.

Input Text / String
Result

How Base64 Encoding Works (RFC 4648 Specification)

Base64 is a binary-to-text encoding scheme defined by IETF RFC 4648. It was engineered to transmit arbitrary binary data (including imagery, cryptographic keys, tokens, and compressed files) safely across communication channels historically built exclusively for 7-bit ASCII plain text, such as SMTP email and HTTP headers.

1. The Mathematics of 6-Bit Encoding

Base64 groups incoming streams of 3 bytes (24 total bits) and subdivides them into 4 chunks of 6 bits each. Because 2^6 = 64, each 6-bit chunk maps directly to a standard 64-symbol alphabet:

  • Uppercase letters A through Z (indices 0 to 25)
  • Lowercase letters a through z (indices 26 to 51)
  • Numeric digits 0 through 9 (indices 52 to 61)
  • Symbols + and / (indices 62 and 63)
  • Padding: the equal sign = appended when the input byte count is not an exact multiple of 3.

As a mathematical consequence of expanding 3 bytes into 4 characters, Base64 encoding imposes approximately 33% payload overhead compared to raw binary transfer.

2. What is URL-Safe Base64 (Base64Url)?

In web URLs, query parameters, and JSON Web Tokens (JWT), the traditional + and / characters collide with URL syntax (where + represents a space). The Base64Url variant substitutes + with hyphen (-) and / with underscore (_), omitting padding characters.

Frequently Asked Questions (FAQ)

Is Base64 encryption or security?+
No. Base64 is strictly a data representation format without keys or secrets. Anyone can reverse Base64 instantly. Never use Base64 alone to protect passwords or confidential data.
What is a Data URI in web development?+
Data URIs embed assets directly into HTML markup or CSS stylesheets without triggering extra HTTP roundtrips, formatted as: 'data:image/png;base64,iVBORw0KGgo...'.

Explore More Essential Developer Tools

Hash Generator (SHA-256)

Calculate SHA-256, MD5, and SHA-512 cryptographic checksums in real time.

UUID v4 & v7 Generator

Generate cryptographically random UUIDs and time-ordered UUID v7 keys.

JSON to TypeScript

Synthesize strongly typed TypeScript interfaces directly from JSON API payloads.

Image Color Picker

Extract pixel colors from images with magnifying loupe and palette exporter.