Developer Tools/Base64 Encoder

Base64 Encoder & Decoder

100% Client-Side • Local Browser Processing
Plain Text Input
Base64 Output
Local browser processing • No data sent to any server

100% Client-Side Processing

All encoding and decoding uses native btoa/atob and TextEncoder/TextDecoder APIs. Your data never leaves your browser.

URL-Safe Base64 (RFC 4648)

Toggle URL-safe mode to replace + with -, / with _, and strip padding. Safe for use in URLs and HTTP headers.

File to Data URI

Upload any file to instantly generate a Base64-encoded Data URI, ready for embedding in HTML, CSS, or API payloads.

Standard Base64 vs URL-Safe Base64 (RFC 4648)

Base64 encodes binary data into 64 printable ASCII characters. Standard vs URL-safe encoding differences:

Variant62nd & 63rd CharsPadding (=)Primary Use Case
Standard (RFC 4648 §4)+ and /Strict (1 or 2 =)MIME email attachments, HTTP Basic Auth, Data URIs
URL-Safe (RFC 4648 §5)- and _Optional / OmittedJWT headers & payloads, URL query parameters, filenames

File to Data URI Scheme Format

Data URIs allow embedding image, audio, and font files directly into HTML or CSS without separate HTTP network roundtrips:

data:[<mediatype>][;base64],<encoded_data>

Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...

URL-safe Base64 is also the encoding format used by JSON Web Tokens (JWT) for both the header and payload segments. Learn how to debug invalid JWT claim errors.

How Base64 Encoding Works

Base64 encoding translates binary data into a set of 64 ASCII characters. Here is how the process works in your browser:

  1. Input Parsing: Plaintext or uploaded files are read into an ArrayBuffer or UTF-8 byte stream using TextEncoder.
  2. Bit Chunking: Data bytes are grouped into 24-bit blocks and divided into four 6-bit index numbers.
  3. Character Lookup: Each 6-bit index maps directly to a character in the RFC 4648 Base64 alphabet.
  4. Padding & Output: Trailing '=' characters are appended as necessary to align 24-bit boundaries.

Client-Side Base64 Security

Encoding sensitive credentials or certificates with cloud utilities risks data leakage. Local processing ensures full safety:

Zero Server Transmission: TextEncoder and Web APIs handle all conversions locally on your machine.

URL-Safe Standard Support: Encode tokens for web headers safely without exposing payload values to remote proxies.

Frequently Asked Questions

Open & Client-Side

Built for Daily Developer Workflows

Free, browser-based utilities that format, validate, and convert data locally. No accounts, no ads, no backend data collection.