Encode or decode text. Base64 standard or URL-safe, and percent-encoding for URLs. Unicode safe.
Encoding is not encryption. Base64 and percent-encoding make text safe to carry in places that restrict characters; anyone can decode them. Do not treat encoded text as hidden or secure.