Quick Start
- Paste your text into Input Text.
- Select Character Set (UTF-8 is recommended).
- (Optional) Set Newline Wrapping for PEM/MIME use.
- (Optional) Toggle URL Safe to use
- and _. - (Optional) Strip padding (=) only if the receiver allows it.
- Copy the result from Base64 Output.
Options Explained
Character Set
Controls how your text becomes bytes before encoding.
- UTF-8: universal & lossless; supports all languages and emoji.
- Latin-1: single-byte (0–255); no emoji/Asian scripts.
- UTF-16: 2-byte code units; use only if required by the receiver.
Newline Wrapping
- None: best for JSON/APIs.
- 64 / 76 columns: PEM/MIME/email. Pick CRLF (Windows) or LF (Unix).
URL Safe
Replaces +→- and /→_ for URLs/JWTs.
Strip padding (=)
Removes trailing =. Enable only if the receiver supports unpadded Base64.
What Happens Under the Hood
- Text → bytes via chosen charset.
- Group into 3 bytes (24 bits).
- Split to four 6-bit values; map to Base64 index table.
- Pad with
= if 1 or 2 bytes remain.
Raw bytes (24 bits): 01001001 01101110 01100110
Split into 6-bit groups: 010010 010110 110011 100110
Base64 characters: S W z m
Output Size
EncodedSize = 4 × ceil(rawSize / 3)
Troubleshooting
- Garbled characters on decode: charset mismatch—use UTF-8 on both sides.
- Rejected in URLs: enable URL Safe; consider stripping padding.
- Email wraps lines: wrap at 76 with CRLF.
- Output looks bigger: Base64 adds ~33% by design.
Security note
Base64 is reversible; use encryption for confidentiality.