What Is Base64 Encoding?
Learn what Base64 encoding is, why developers use it, and how to encode or decode Base64 strings online — including URL-safe mode.
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters. Developers use it to safely transmit data through systems that only handle text — like JSON payloads, email attachments, and data URIs.
Why use Base64?
- Embed small images directly in HTML or CSS using data URIs
- Send binary data inside JSON or XML without corruption
- Encode credentials for HTTP Basic Authentication headers
- Store binary blobs in text-only databases or logs
How Base64 encoding works
Base64 takes every 3 bytes of input (24 bits) and splits them into 4 groups of 6 bits. Each group maps to one of 64 characters: A–Z, a–z, 0–9, plus, and slash. Padding with = is added when input length is not divisible by 3.
Standard vs URL-safe Base64
Standard Base64 uses + and / which break in URLs. URL-safe Base64 replaces them with - and _ and often omits padding — the format JWTs use. Utiliio's Base64 workbench supports both modes with live encode/decode on one page.
Example
The string "Hello World" encodes to "SGVsbG8gV29ybGQ=". You can verify this instantly using the free Base64 workbench — no data leaves your browser.
Open Base64 workbench →Base64 vs other encodings
Base64 is not encryption — it is encoding. Anyone can decode it. For URL query strings, use percent-encoding. For cryptographic hashing, use a hash generator. Base64 is specifically for representing binary data as ASCII text.
Try the Hash Generator →