Base64 Encoder / Decoder
Encode plain text to Base64 or decode Base64 strings back to readable text. Full UTF-8 support, no data leaves your browser.
All processing is client-side — your data never leaves your browser.About Base64 Encoding
What is Base64?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string of 64 printable characters. It's widely used to safely transmit data over text-based channels that may not handle raw binary.
When to Encode
Use encoding when embedding images directly in HTML or CSS (data: URIs), storing binary data in JSON, sending binary content over email with MIME, or passing structured data through a URL-safe channel.
When to Decode
Use decoding when you receive a Base64 string from an API response, JWT payload, or configuration file and need to read the original content. Paste the encoded string and switch to the Decode tab.
URL-Safe Variant
Standard Base64 uses + and / which are special characters in URLs. The URL-safe variant replaces them with - and _. JWTs use this variant. This tool outputs standard Base64.
How to use
- 1Enter your text or Base64
Paste the text you want to encode, or the Base64 string you want to decode, into the input area.
- 2Choose Encode or Decode
Click "Encode" to convert your text to Base64, or "Decode" to convert Base64 back to readable text.
- 3Copy the result
Use the Copy button to grab the output. The result updates instantly.
Frequently asked questions
What is Base64 encoding?
Base64 converts binary data or text into a string of ASCII characters using 64 safe characters (A–Z, a–z, 0–9, +, /). This makes it safe to transmit through text-based systems like email, HTTP headers, or JSON APIs that might misinterpret raw binary bytes.
When do developers use Base64?
Common use cases: embedding images in CSS data URLs (data:image/png;base64,...), sending binary attachments in JSON payloads, encoding credentials in HTTP Basic Auth headers, and storing binary data in XML or HTML attributes.
What is URL-safe Base64?
Standard Base64 uses + and / characters that have special meaning in URLs. URL-safe Base64 replaces them with - and _ respectively, making the encoded string safe to include in query parameters without further percent-encoding. JWTs use URL-safe Base64.
Can I decode any Base64 string?
Yes — the tool handles both standard and URL-safe Base64. If the input is not valid Base64 (wrong length, invalid characters), an error message will appear.