Кодируйте текст в Base64 формат
Tool guide
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.
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.
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.
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.
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.
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.
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.
Before: admin:hunter2
After: Authorization: Basic YWRtaW46aHVudGVyMg==
Before: postgres://app:secret@db:5432/prod
After: cG9zdGdyZXM6Ly9hcHA6c2VjcmV0QGRiOjU0MzIvcHJvZA==
Your rating and feedback help decide what to improve next.