Base64URL Encoder / Decoder
Encode UTF-8 text to URL-safe Base64 or decode a Base64URL value back to text.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Encoded 5 character(s) of UTF-8 text to 7 URL-safe Base64 character(s).
How it works
- Read the input as UTF-8 bytes.
- Grouped the bytes in threes and mapped each group to four characters from the URL-safe alphabet (A-Z, a-z, 0-9, -, _).
- Omitted the '=' padding so the value is directly usable in a URL or JWT segment.
- Base64URL is an encoding, not encryption; it provides no confidentiality.
- The tool accepts both padded and unpadded input so JWT segments decode directly.
Methodology
- Encode by grouping UTF-8 bytes in threes and mapping each group to four six-bit characters from the URL-safe alphabet.
- Decode by reversing that mapping, restoring any omitted padding, and rejecting characters outside the alphabet.
- Treat the result as an encoding only: it provides no confidentiality.
Usage
- Choose encode or decode.
- Paste text to encode, or a Base64URL value to decode.
- Read the result; use Copy result to reuse it.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Encode ASCII
{
"mode": "encode",
"value": "hello"
}Encode Unicode
{
"mode": "encode",
"value": "café 🌍"
}Decode a Base64URL value
{
"mode": "decode",
"value": "aGVsbG8"
}Limitations
Where Base64URL is used
Base64URL carries binary data through text-only channels that forbid '+' and '/'. JSON Web Tokens, URL parameters and file names are the common cases. The standard Base64 tool remains the right choice when the surrounding system expects the '+'/'/' alphabet.
Frequently asked questions
- How is Base64URL different from standard Base64?
- It uses '-' instead of '+' and '_' instead of '/' so the text is safe in URLs, file names and JWT segments; the padding is often omitted.
- Why does my output have no '=' characters?
- The URL-safe form usually omits padding because a URL or token carries its own length. This tool accepts padded and unpadded input on decode.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.