The Base64 Encoder / Decoder converts text to Base64 encoding or decodes Base64 strings back to plain text instantly. Supports standard Base64 and URL-safe Base64 (replacing + with - and / with _). Handles Unicode text correctly using UTF-8 encoding.
Base64 is used to encode binary data as ASCII text for safe transmission in email (MIME), embedding images in HTML or CSS data URIs, encoding credentials in HTTP Basic Auth headers, storing binary data in JSON or XML, and passing data in URLs.
Everything runs entirely in your browser using the atob() and btoa() Web APIs. Your data never leaves your device.
Paste your text or Base64 string into the input.
Select Encode (text → Base64) or Decode (Base64 → text).
Optionally enable URL-safe mode for use in URLs.
Copy the result.
Base64 and URL encoding solve different problems. Base64 converts arbitrary binary data into a compact ASCII representation, used for embedding images, encoding auth headers, and storing binary data in text formats.
URL encoding (percent-encoding) instead makes text safe to appear inside a URL by escaping characters like spaces and & that would otherwise break the URL's structure. They're sometimes combined: a Base64 string can itself need URL encoding if it contains + or / and is placed in a URL, which is exactly why Base64's URL-safe variant exists.
Base64 is often mistaken for encryption, but it provides no security at all. It is a public, reversible encoding scheme — anyone can decode a Base64 string instantly with no key required.
Encryption transforms data using a secret key so that only someone with that key can recover the original content. If you need to protect sensitive data, use a real encryption algorithm like AES; use Base64 only when you need to represent binary data as text, not when you need to hide it.
Base64 encodes binary or arbitrary data as printable ASCII text for safe transmission in systems that only handle text, such as email (MIME), HTTP headers, JSON, XML, and URLs.
Yes — URL-safe mode replaces + with - and / with _ so the output can be safely included in URLs and filenames without percent-encoding.
Yes — text is encoded as UTF-8 before Base64 encoding, ensuring all Unicode characters including emoji are handled correctly.
No — Base64 is encoding, not encryption. It does not provide any security. Anyone who sees a Base64 string can decode it instantly.
Encode the image file as Base64, then use it as: <img src="data:image/png;base64,ENCODED_DATA_HERE">
Base64 represents every 3 bytes of data as 4 ASCII characters (4/3 ratio). This overhead is the trade-off for making binary data safe to transmit as text.
Yes — Kubernetes stores secret values as Base64-encoded strings in manifests and 'kubectl get secret -o yaml' output. Paste the encoded value here to decode it back to plain text.
The = characters are padding, added when the input length isn't a multiple of 3 bytes. Padding ensures the encoded output length is always a multiple of 4 characters, which some decoders require.
This tool encodes and decodes text input. For encoding actual binary files (images, PDFs), that's typically done in code, though the resulting Base64 string can be decoded back here if it represents text-based content.