Developer
Encoders, converters & dev utilities
Text to Base64 (Encode) Converter
Encode any text into Base64. Base64 (RFC 4648) represents the UTF-8 bytes of your string using 64 printable characters (A–Z, a–z, 0–9, + and /), turning every 3 bytes into 4 characters so the result is safe to embed in JSON, URLs, HTTP headers, email, and data URIs. Worked example: the text "Man" is the bytes 4D 61 6E, which encode to TWFu — a clean 3-bytes-to-4-characters mapping with no padding. A single-byte input like "M" (byte 4D) does not fill a group, so it encodes to TQ== with two padding characters. Encoding runs entirely in your browser; nothing is uploaded. Free, no login.
Encode = take the UTF-8 bytes and map every 3 bytes to 4 Base64 characters (RFC 4648)
- Byte-exact worked example: "Man" = bytes 4D 61 6E → "TWFu" (3 bytes → 4 chars, no padding)
- Padding example: "M" = 1 byte (4D) → "TQ==" — two = mark the incomplete final group
- 100% client-side (TextEncoder + btoa over the UTF-8 bytes) — your text is never uploaded
- Base64 is encoding, not encryption — the output is trivially decodable, so it hides nothing
Frequently asked questions
How do I encode text to Base64?
Type or paste your text and the tool takes its UTF-8 bytes and encodes them in Base64, mapping each group of 3 bytes to 4 characters. For example "Man" (bytes 4D 61 6E) becomes TWFu. It runs in your browser using TextEncoder and btoa, so Unicode text encodes correctly and nothing is uploaded.
Why does my Base64 output end in "=" or "=="?
Those are padding characters, added when the input length is not a multiple of 3 bytes. Base64 encodes in 3-byte groups; if only 2 bytes are left the output group ends with one =, and if only 1 byte is left it ends with two ==. So the single byte of "M" encodes to TQ==, while the three bytes of "Man" fill a whole group and need no padding, giving TWFu.
Can I use Base64 to hide a password or secret?
No. Base64 is a reversible encoding with no key, so anyone can decode it back to the original text instantly. It offers no confidentiality whatsoever and must never be used to conceal passwords, API keys, or other secrets. Its only job is to make bytes safe to transport as text. To actually protect data, encrypt it.