IT Market
Tools/Code/Data/Text to Base64 Encoder Online — Free
Text → Base64

Кодируйте текст в Base64 формат

Tool guide

Text to Base64 Encoder Online — Free

Encoding to Base64 matters when a string has to go somewhere that only tolerates safe ASCII: a Basic Auth header, the data block of a Kubernetes manifest, an environment variable in a CI pipeline, an encoded mail header. Type or paste your text, press encode, and you get a string ready to drop in. Non-Latin characters are treated as UTF-8, so decoding later returns them character for character. Everything runs in the tab. See also: decode a Base64 string back to text, encode a whole file to Base64, percent-encode a value for a query string.

How to use it

  1. Type or paste your string into the text input box — a couple of words or a multi-line block.
  2. Press encode and the result appears in the Base64 output box as one continuous string.
  3. Copy it and paste the value into a manifest, a request header or an environment variable.
  4. For Basic Auth, encode login and password together with the colon and no spaces around it.
  5. Clear wipes both boxes before you move on to the next string.

FAQ

Is Base64 encryption? Can I hide a password with it?

No. It is an encoding, not a cipher — there is no key and anyone can reverse it in a second. Kubernetes secret values are stored this way and are not considered protected. Base64 solves a compatibility problem, carrying arbitrary bytes through a text-only channel; it gives you no confidentiality.

How are accented characters and emoji handled?

The text is converted to UTF-8 bytes first and those bytes are encoded. An accented or Cyrillic letter takes two bytes and an emoji takes four, so such input produces a noticeably longer string than the same number of Latin characters. Decoding as UTF-8 restores it exactly.

Why is the output about a third longer than my text?

Every three bytes become four characters of the Base64 alphabet, roughly 33 percent growth, plus one or two padding signs at the end. Worth remembering when the value goes into a request header or an environment variable where length is capped.

Can I use this output in a JWT or a URL parameter?

Not directly. Those use base64url, where plus becomes hyphen, slash becomes underscore and the padding is dropped, otherwise the characters would need escaping. Substitute those three things by hand, or use the URL Encode page when the target is a query parameter.

Should the output be wrapped at 76 characters?

The result here is one continuous line, which is what headers, JSON and environment variables want. Wrapping at 76 characters comes from the old MIME mail standard; if the value is destined for an email body you will need to insert those breaks yourself.

How do I verify the encoding is correct?

Run it back through the Base64 to Text page and compare with the source. If you get exactly the same text, trailing spaces and line breaks included, nothing was lost. It is the quickest sanity check before dropping the value into a environment config.

Examples

Basic Auth header for an API request
Before: admin:hunter2
After: Authorization: Basic YWRtaW46aHVudGVyMg==
Value for the data block of a Kubernetes secret
Before: postgres://app:secret@db:5432/prod
After: cG9zdGdyZXM6Ly9hcHA6c2VjcmV0QGRiOjU0MzIvcHJvZA==