What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It's widely used to embed binary data in text-based formats such as JSON, XML, HTML, email (MIME), and data URIs.
When To Use This Tool
Reach for this Base64 tool whenever you need to embed a binary value inside a text-only transport — generating Basic Auth headers, encoding a JWT signing key, embedding a small icon as a data URI, copying a TLS certificate between systems, or debugging an API payload that returns Base64-encoded blobs. Because everything runs locally in your browser, you can paste credentials and confidential payloads without sending them to a third-party server.
Standard vs. URL-Safe Base64
Standard Base64 uses + and / characters, which are reserved in URLs. URL-safe Base64 replaces them with - and _ and strips trailing = padding, making it safe for use in query strings and file names.
Common Use Cases
- Encoding API keys and tokens for transport in HTTP headers
- Embedding small images as data URIs in HTML and CSS
- Encoding email attachments (MIME Base64)
- Storing binary data in JSON payloads
- Decoding JWT token payloads for debugging
- Generating HTTP Basic Authentication credentials (`Basic <base64(user:pass)>`)
- Encoding binary payloads inside JSON when a multipart upload isn't an option
- Inspecting JWT tokens — the header and payload segments are URL-safe Base64