Base64 Encoder & Decoder
Encode UTF-8 text to standard Base64 and decode Base64 back to validated UTF-8 text.
Input is encoded or decoded locally. Base64 is not encryption.
Input
Standard RFC 4648 Base64. Outer whitespace is trimmed; interior whitespace, URL-safe alphabet, and incorrect padding are rejected.
Output
How Base64 works
Base64 groups every three bytes into four six-bit values and maps them to the standard alphabet A–Z a–z 0–9 + /. Padding with = makes the final length a multiple of four. Encoding increases size by roughly one third.
Unicode handling
Text is converted to UTF-8 bytes before encoding. Decoding validates both the Base64 structure and the resulting UTF-8 bytes, so arbitrary binary data that is not valid UTF-8 is rejected in text mode.
Frequently asked questions
Is Base64 safe for secrets?
No. Anyone can decode it. Use encryption and proper key management for confidentiality.
Why is URL-safe Base64 rejected?
URL-safe Base64 uses - and _ instead of + and /. It is a separate encoding mode and is not silently mixed into this standard mode.
Does this tool handle files?
No. The MVP encodes and decodes UTF-8 text. Binary file support would need a separate workflow.