Base64 Encode — Text to Base64
🔒 Runs in your browser — nothing is sent to a serverBase64 encode any text into a compact ASCII string with one click. Type or paste the plain text below and this tool returns a clean Base64-encoded value ready to drop into JSON payloads, data URIs, `Authorization` headers, email MIME parts or JWT tokens. Full UTF-8 is handled — emoji, accented letters and non-Latin scripts all encode losslessly. Everything runs 100% in your browser: the source text never leaves your device and nothing is uploaded to a server.
When to Base64 encode text
Base64 encoding of text is the quick fix whenever a string must survive a text-only pipeline without being mangled. Common moments to reach for a Base64 encoder: packaging a secret in a `.env` or Kubernetes Secret, embedding a small font or SVG in a data URI, producing a dummy JWT payload while debugging, transporting pre-formatted email bodies through APIs, or sending a UTF-8 string through legacy systems that only accept ASCII. Running the encode in a trustworthy, offline-first page is the fastest way to generate a value you are about to paste into production code.
How text-to-Base64 encoding works under the hood
Text-to-Base64 encoding is a two-step process. First the input string is converted to its UTF-8 byte sequence — for plain ASCII this is identity, for emoji or accented letters it expands to 2–4 bytes per character. Second, the byte stream is cut into 24-bit groups, each group is split into four 6-bit values, and every value is mapped to a character in the 64-symbol Base64 alphabet. Trailing `=` padding is appended when the final group is shorter than three bytes. This page performs both steps entirely in the browser using the built-in `TextEncoder` and `btoa` APIs.
Examples
Hello, World!SGVsbG8sIFdvcmxkIQ==base64 encode onlineYmFzZTY0IGVuY29kZSBvbmxpbmU=