// DEV TOOL

Base64 Encoder & Decoder

Encode text or files to Base64 and decode Base64 strings instantly. Supports UTF-8, URL-safe mode, and file encoding. All processing in your browser โ€” nothing sent to any server.

INPUT TEXT
OUTPUT

// What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (Aโ€“Z, aโ€“z, 0โ€“9, +, /). It was invented to safely transmit binary data through channels designed for text.

Encode: Text โ†’ Binary bytes โ†’ Groups of 6 bits โ†’ 64-char alphabet
Decode: Base64 chars โ†’ 6-bit groups โ†’ Bytes โ†’ Original text
Size: 3 input bytes = 4 output chars (+33% overhead)
// When to use Base64

Embedding images in HTML/CSS (data URIs), JSON API payloads carrying binary data, MIME email attachments, storing binary data in text-only databases.

// URL-safe Base64

Replaces + with - and / with _ so the output can be used directly in URLs and filenames without percent-encoding. Common in JWT tokens and OAuth flows.

// Base64 โ‰  Encryption

Base64 is trivially reversible and provides zero security. Never use it to protect passwords or sensitive data. Use proper encryption instead.

// File encoding

Any file can be Base64 encoded โ€” images, PDFs, fonts, audio. The encoded string can be embedded as a data URI in HTML, CSS, or JSON.

// FAQ

Base64 is a binary-to-text encoding scheme representing binary data with 64 printable ASCII characters. It is used to safely transmit binary data over text channels like email, JSON APIs, and HTML data URIs.
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _ making output safe to use in URLs and filenames without percent-encoding. Common in JWT tokens.
No. Base64 increases data size by ~33% (3 bytes become 4 characters). It is an encoding scheme to make binary data text-safe, not a compression algorithm.
No. Base64 is encoding, not encryption. It is instantly reversible by anyone with a decoder. Never use it to protect sensitive information โ€” use proper cryptographic algorithms like AES.
Yes โ€” 100%. All encoding and decoding happens entirely in your browser using JavaScript. No data is sent to any server. Your text and files never leave your device.
// Related tools