Base64 Encoder & Decoder
Encode and decode text or files to/from Base64 with full UTF-8 Unicode support and URL-safe mode toggle.
About the Base64 Encoder & Decoder
Step-by-Step How to Use
Follow these simple instructions to achieve accurate, instant calculations or data transformations:
Select 'Encode' to generate Base64 or 'Decode' to restore the original UTF-8 plaintext.
Paste your raw text, JSON string, or Base64 code into the input workspace.
Instantly copy the converted string or download it with zero server roundtrips.
Mathematical Formulas & Technical Mechanics
Under the hood, calculations and operations strictly adhere to validated standards:
1. Convert input characters into 8-bit binary bytes (UTF-8). 2. Group consecutive bytes into 24-bit chunks (3 bytes = 24 bits). 3. Split each 24-bit chunk into four 6-bit integers (2^6 = 64 possible values). 4. Map each 6-bit value (0-63) to the Base64 character set: [A-Z = 0-25, a-z = 26-51, 0-9 = 52-61, + = 62, / = 63] 5. Add '=' padding if input byte count is not divisible by 3.
Worked Example: Base64 Encoding
- ASCII Bytes: 72 101 108 108 111 32 88 69 83 84 85 83
- Base64 Encoded:
SGVsbG8gWEVTVFVTCg== - Decoding: Decoding
SGVsbG8gWEVTVFVTCg==returns exactly"Hello XESTUS".
Practical Real-World Use Cases
Discover how professionals, developers, students, and businesses use this tool daily:
API Authentication Headers
Encode username:password pairs for HTTP Basic Authentication headers.
Data URI Scheme Generation
Embed small icons and SVGs directly inside HTML and CSS using inline Base64 data URIs.
Webhook & Payload Debugging
Decode Base64 payloads received from Stripe, GitHub, or AWS webhooks during debugging.
Frequently Asked Questions
No. Base64 is an encoding scheme, not encryption. It is designed to represent binary data in an ASCII format for safe transmission, not to hide or secure confidential information.