Base64 Converter.
Encode and decode Base64 with proper UTF-8 handling and an URL-safe mode.
RUN
0 B
0 B
status IDLE
how it works
- Pick Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Type or paste in the Input box — the Result updates live. Check URL-safe for base64url.
- Use Swap to exchange input and result, or Copy Result to put it on your clipboard.
correct utf-8 handling
This converter encodes text as UTF-8 bytes before Base64, so emoji, Thai, and any Unicode round-trip correctly. Many naive btoa snippets corrupt non-ASCII text — herestringToBytes and bytesToString from quorin handle it properly.
Decoding is strict: mixed alphabets, stray characters and bad padding are rejected. Whitespace (line breaks, spaces) is stripped and retried once for convenience; otherwise the error code is shown inline so you can fix the input.
Toggle URL-safe to switch between the standard alphabet (+/) andbase64url (-_). That is the variant used in URLs and JWTs where+ and / would need escaping.