Base64 Encoder
Encode text to Base64 instantly.
What is Base64 Encoding?
Base64 is an encoding scheme that represents binary data as plain ASCII text, using 64 characters (A–Z, a–z, 0–9, +, /). It exists because many systems — email, JSON, XML, URLs — are designed to carry text, not arbitrary binary bytes. Encoding data to Base64 makes it safe to embed or transmit through those text-only channels without corruption.
Encoding converts plain text or binary input into its Base64 representation. This tool encodes plain text to Base64, which is the direction needed when preparing a value for an HTTP Basic Auth header, embedding a small asset as a data: URI, or storing a value in a system (like Kubernetes Secrets) that expects Base64 input.
Encoding to Base64 typically increases the size of the data by about 33%, since each group of 3 raw bytes is represented using 4 ASCII characters. It's worth noting that Base64 is not encryption — it provides no confidentiality, since anyone can decode it back to the original without a key.
This page lets you encode text to Base64 online for free, directly in your browser. Type or paste any text and get its Base64 output instantly — nothing is uploaded or sent to a server.
Why Encode to Base64?
API & Auth Headers
HTTP Basic Authentication and some API tokens require credentials to be Base64-encoded before being sent in a header.
Embedding Binary in Text
JSON, XML, and URLs are text-only formats. Encoding binary data (like a small image) to Base64 lets it travel safely inside them.
Config & Secrets
Kubernetes Secrets and some environment variable systems expect values to be Base64-encoded before being stored.
Data URIs
Encoding an image or font to Base64 lets you embed it directly in HTML or CSS via a data: URI, avoiding an extra network request.
Example
Here's a plain text string and its Base64-encoded form.
Hello, World!SGVsbG8sIFdvcmxkIQ==Features
Encode Instantly
Type or paste plain text and get its Base64 representation immediately.
100% Client-Side
Encoding happens entirely in your browser. Your data is never uploaded or sent to a server.
Email & MIME
Produce Base64 payloads suitable for embedding in email source or MIME messages.
Data URIs
Generate the Base64 portion of a data: URI for embedding small assets inline.