Developer
Base64
Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters so it can travel safely through text-only channels.
Updated 12 Aug 2026
How the encoding works
Base64 takes three bytes of input — 24 bits — and re-slices them into four 6-bit groups. Each group indexes an alphabet of A–Z, a–z, 0–9, plus and slash, producing four printable characters. Output is therefore about 33% larger than the input, which is the price of surviving systems that only handle text.
When the input length is not a multiple of three, the final group is padded with one or two equals signs so the output length stays a multiple of four. A URL-safe variant swaps plus and slash for minus and underscore, because the standard characters have special meaning inside URLs.
Base64 is not encryption
Anyone can decode Base64 instantly — there is no key and no secret. Never use it to hide passwords, tokens or personal data. Encode for transport, encrypt for confidentiality.
Where it shows up
- Data URIs that embed a small image or font directly in CSS or HTML
- Email attachments, which MIME encodes so binary survives mail servers
- HTTP Basic authentication headers
- JWT segments, which use the URL-safe variant
- Binary blobs stored inside JSON or XML documents
Base64 Encoder
Encode or decode text and files locally — nothing is uploaded.
Characteristics
- 64-character alphabet plus = for padding
- Three input bytes become four output characters
- Increases size by roughly one third
- Reversible with no key — an encoding, not a cipher
- URL-safe variant replaces + and / with - and _
Common uses
- Embedding small assets as data URIs
- MIME email attachments
- HTTP Basic authentication credentials
- Encoding binary payloads inside JSON or XML
Advantages
- Lets binary data pass through text-only protocols unchanged
- Supported natively in every language and browser
- Deterministic and lossless
- Simple to debug — the output is visible plain text
Limitations
- Adds about 33% to payload size
- Provides no security whatsoever
- Large encoded blobs bloat JSON and slow parsing
- Standard alphabet is unsafe in URLs without the variant
Examples
Input: ToolSera
Base64: VG9vbFNlcmE=
Input: Hi
Base64: SGk=Frequently asked questions
What is Base64 used for?
Carrying binary data through channels that only accept text: email attachments, data URIs, auth headers and JSON payloads.
Is Base64 encryption?
No. It is a reversible encoding with no key, so anyone can decode it instantly.
Why does Base64 end with equals signs?
Padding keeps the output length a multiple of four when the input is not a multiple of three bytes.
Does Base64 make files bigger?
Yes, by roughly 33%, so avoid it for large assets you can serve as binary.
What is URL-safe Base64?
A variant that uses - and _ instead of + and / so the result can appear in a URL without escaping.
Related terms
Character Encoding
Character encoding is the mapping between the characters people read and the bytes computers store, defining how text is turned into binary and back again.
UTF-8
UTF-8 is a variable-width Unicode encoding that represents every character in one to four bytes and is fully backwards compatible with ASCII.
JWT
A JSON Web Token (JWT) is a compact, signed token that carries JSON claims about a user or client so a server can verify identity without a database lookup.
URL Encoding
URL encoding, also called percent-encoding, replaces characters that have a special meaning or are unsafe in a URL with a percent sign followed by their hexadecimal byte value.
Regex
A regular expression (regex) is a compact pattern language for finding, validating and replacing text that matches a described shape rather than a fixed string.
API
An API (Application Programming Interface) is a defined contract that lets one piece of software request data or actions from another without knowing how it works internally.
Related tools
Related guides
Base64 Explained: What It Is and When to Use It
How Base64 turns binary into text, why output is about 33% larger, where padding comes from, URL-safe variants, and why Base64 is encoding rather than encryption.
What Is JSON? A Plain-English Guide
JSON explained without jargon: what it is, how the syntax works, which data types it supports, where it is used and how it differs from JavaScript objects.
Why Does Compressing an Image Make It Bigger?
When image compression increases file size: re-encoding optimized JPEGs, PNG for photos, quality/format mismatches, and Max quality with no downsampling. How Image Compressor warns instead of faking a win — and what to try next.
URL Encoding Explained (Percent-Encoding)
Why URLs need encoding, which characters are reserved, the difference between encodeURI and encodeURIComponent, plus and space confusion, and how to avoid double encoding.