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

Processed entirely in your browser; nothing is uploaded.

Result
aGVsbG8

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

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

  1. Encode by grouping UTF-8 bytes in threes and mapping each group to four six-bit characters from the URL-safe alphabet.
  2. Decode by reversing that mapping, restoring any omitted padding, and rejecting characters outside the alphabet.
  3. Treat the result as an encoding only: it provides no confidentiality.

Usage

  1. Choose encode or decode.
  2. Paste text to encode, or a Base64URL value to decode.
  3. 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

jsonSelect to copy
{
  "mode": "encode",
  "value": "hello"
}

Encode Unicode

jsonSelect to copy
{
  "mode": "encode",
  "value": "café 🌍"
}

Decode a Base64URL value

jsonSelect to copy
{
  "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

  1. RFC 4648: The Base16, Base32, and Base64 Data Encodings — IETF