Base64 & URL Encoder
Encode and decode text with Base64, URL-encode and URL-decode. Useful for JWT tokens, query strings and API parameters.
What Is Base64?
Base64 is an encoding scheme that converts any binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It's used everywhere: JWT tokens, email attachments (MIME), data URIs, Basic Auth headers.
When to use Base64 Encode?
- Embedding images directly in HTML/CSS:
data:image/png;base64,iVBOR... - Storing binary data in JSON (which only accepts UTF-8 strings)
- HTTP Basic Auth:
Authorization: Basic dXNlcjpwYXNz=user:passencoded - Decoding JWT tokens (header + payload are Base64URL encoded)
URL Encode — What does it do?
URL Encoding (percent-encoding) converts characters that aren't allowed in URLs into %XX format. E.g. & becomes %26, space becomes %20.
Before: hello world & more After: hello%20world%20%26%20more
Punycode — What is it?
Punycode (ACE — ASCII Compatible Encoding) converts Unicode domains into ASCII format that DNS can handle. E.g. ελλάδα.gr → xn--hxakic4aa.gr. Used for IDN (Internationalized Domain Names).
Base64 / URL Encode-Decode run 100% in your browser. Punycode uses the server (PHP intl).
Frequently Asked Questions
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode it without a key. Never use Base64 to hide passwords or sensitive data.
What is the difference between Base64 and Base64URL?
Base64URL replaces
+ with - and / with _, and omits = padding. It is used in JWT tokens and URLs where those characters have special meaning.Is processing done on the server?
Base64 and URL Encode/Decode run 100% in your browser — your data is never sent anywhere. Only Punycode uses the server (PHP intl extension).
Why is the Base64 output larger than the input?
Base64 encodes every 3 bytes into 4 characters, so the output is ~33% larger than the original. This is an unavoidable trade-off of the encoding scheme.