Encode attracting to Base64
Base64 result: YXR0cmFjdGluZw==
For encoded binaries (like images, documents, etc.) use the file upload form below.
Encode base64 strings in real-time as you type or paste.
Encoding Process: attracting to YXR0cmFjdGluZw==
About the '=' Padding
Base64 encoding requires the input length (in bytes) to be divisible by 3. If it's not, padding is added: Two '=' characters are added when the input length modulo 3 equals 1. This happens because the input length leaves a remainder of 1 when divided by 3, indicating that two more bytes are needed to complete the 3-byte group. This ensures the encoded output is properly aligned.
Step 1: Map ASCII Characters to Binary
| ASCII Character | Binary Value |
|---|---|
| a | 01100001 |
| t | 01110100 |
| t | 01110100 |
| r | 01110010 |
| a | 01100001 |
| c | 01100011 |
| t | 01110100 |
| i | 01101001 |
| n | 01101110 |
| g | 01100111 |
Step 2: Group Bits into 6-bit Chunks
The binary string is grouped into 6-bit chunks for Base64 encoding:
011000 010111 010001 110100 011100 100110 000101 100011 011101 000110 100101 101110 011001 11
Step 3: Convert Binary to Base64
| Binary Value | Base64 Character |
|---|---|
| 011000 | Y |
| 010111 | X |
| 010001 | R |
| 110100 | 0 |
| 011100 | c |
| 100110 | m |
| 000101 | F |
| 100011 | j |
| 011101 | d |
| 000110 | G |
| 100101 | l |
| 101110 | u |
| 011001 | Z |
| 11 | w |
When combined, these characters form the encoded string: "YXR0cmFjdGluZw=="
Related Conversion Tools
Recent Posts
How to Base64 Encode Data in Bash Linux
December 11, 2024
How to Base64 Encode Data in Go (Golang)
December 11, 2024
How to Base64 Encode Data in JavaScript
December 11, 2024
How to Base64 Encode Data in PowerShell
December 11, 2024
How to Base64 Encode a String in Node.js
December 11, 2024
Encode History
Your encode history will appear here. Start encoding to build your history!