Developer Tools
Live

Base64 Encode/Decode

Encode text to Base64 or decode Base64 back to text. Unicode-safe.

Encode text to Base64 or decode Base64 back to text. Unicode-safe.

Quick start: Paste plain text or a Base64 string into the input area. → Click Encode to turn text into Base64, or Decode to turn Base64 back into text. → Check the output area, where emoji and non-Latin characters round-trip correctly.

How to use Base64 Encode/Decode

  1. 1

    Paste plain text or a Base64 string into the input area.

  2. 2

    Click Encode to turn text into Base64, or Decode to turn Base64 back into text.

  3. 3

    Check the output area, where emoji and non-Latin characters round-trip correctly.

  4. 4

    Click the copy button to place the result on your clipboard.

Real examples of Base64 Encode/Decode in action

Build a Basic Auth header value
Before
admin:s3cret!
After
YWRtaW46czNjcmV0IQ== (prefix with 'Basic ' in the Authorization header)
Decode a JWT payload segment
Before
eyJzdWIiOiIxMjM0IiwibmFtZSI6IkphbmUifQ
After
{"sub":"1234","name":"Jane"}
Encode an emoji safely
Before
Hello! 🎉
After
SGVsbG8hIPCfjok= (UTF-8 bytes, not corrupted)
Popular tools

Try our most-used tools

Who is Base64 Encode/Decode for?

API developers assembling HTTP Basic Authentication headers

Security engineers decoding suspicious Base64 payloads during incident review

SREs reading Base64 values stored in Kubernetes secrets

Frontend developers embedding small assets as data URIs

Why use Base64 Encode/Decode?

  • Encodes and decodes full UTF-8, so emoji, CJK text, and accented characters survive the round trip intact.
  • Uses the browser's TextEncoder and TextDecoder, avoiding the classic 'character out of range' error that plain btoa throws on Unicode.
  • Works in both directions from one box, so you can paste a value and pick the operation.
  • Makes no network calls, which is essential when decoding tokens or credentials.
  • Copies the result with a single click for pasting into headers, code, or config files.

Common use cases

  • Encode a username and password into the value for an HTTP Basic Authentication header.
  • Decode the payload segment of a JWT to read its claims without a dedicated decoder.
  • Decode a Base64 value pulled from a Kubernetes secret or an environment file during debugging.
  • Build a small data URI by encoding a short snippet for embedding in HTML or CSS.

How Base64 Encode/Decode keeps your data private

Base64 encoding happens via the browser's native btoa/atob and TextEncoder APIs — no roundtrip to any server. This is critical for decoding production secrets, API tokens, or credentials, since those values must never leave developer machines. Many online Base64 tools log input; ours cannot, because it never receives any input.

How Base64 Encode/Decode compares to alternatives

Honest comparison to other popular options — pick the right tool for the job.

ToolMain limitation
Base64decode.orgSends pasted strings to its server, unsafe for credentials or tokens
Base64encode.netAd-heavy and runs analytics on activity
openssl base64Requires OpenSSL installed and care with line-wrapping flags
Base64 Encode/DecodeFree, runs in your browser, no sign-up, no watermarks, no file-size limits beyond your device memory.

Limitations & things to know

  • Handles text strings only; binary files belong in the Image to Base64 tool
  • Produces standard Base64; the URL-safe variant using - and _ is not yet supported

About Base64 Encode/Decode

Base64 is an encoding scheme that represents binary data using only 64 printable ASCII characters (A to Z, a to z, 0 to 9, plus + and /), with = used for padding. It is not encryption and provides no security; its job is to let arbitrary bytes travel safely through channels that expect text, such as HTTP headers, JWT segments, data URIs, and email attachments. Xevon Tools' Base64 Encode/Decode tool converts in both directions with full Unicode support. The Unicode part matters more than it sounds: the browser's built-in btoa function only accepts Latin-1 characters and throws an error the moment you feed it an emoji or a Chinese character. This tool avoids that trap by first running your input through TextEncoder to produce UTF-8 bytes, then Base64-encoding those bytes, and reversing the process on decode with TextDecoder. The practical result is that 'Hello! [party]' or a Japanese sentence round-trips cleanly. Encoding inflates size by roughly one third, since every three bytes of input become four Base64 characters, which is the trade-off for text safety. Common jobs include assembling an HTTP Basic Authentication header (the credentials are Base64 of 'user:password', not encrypted, so treat them as plaintext over HTTPS), peeking at a JWT payload, or decoding a value stored in a Kubernetes secret. Because all of this happens locally in your browser, you can safely decode production tokens and credentials that must never leave a developer's machine. Paste a string, pick encode or decode, and copy the result in one click without installing a CLI utility.

Frequently asked questions

The browser's btoa only accepts characters in the Latin-1 range, so it throws on emoji or CJK text. This tool first runs your text through TextEncoder to get UTF-8 bytes, then Base64-encodes those bytes, which is why any Unicode string works.
Standard Base64 uses the characters + and /, which have special meaning inside URLs. URL-safe Base64 swaps them for - and _ so the string can sit in a query parameter. This tool produces standard Base64; URL-safe output is planned.
This version handles text strings. To turn an image into a Base64 data URI, use the Image to Base64 tool, which accepts file uploads directly.
No. Everything runs in your browser, so a decoded secret or token never reaches a server and is never logged.

Helpful tutorials

Practical guides that show real workflows for this tool and related tasks.

Your files never leave your device

Every tool on Xevon Tools runs 100% in your browser. No uploads, no servers, no tracking. Free forever.

Learn more

Embed Base64 Encode/Decode on your site

Add this tool to your own website, blog, or internal tool page with one line of code. Free to use, no attribution required (but appreciated).

<iframe src="https://www.xevontools.com/embed/base64-encode-decode" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px;" title="Base64 Encode/Decode — Xevon Tools"></iframe>
Share: