Encoding

Encode text as Base64URL

Base64URL packs bytes the same way Base64 does, with an alphabet that is safe in URLs: + becomes -, / becomes _, and the trailing = padding is dropped. The result sits in query strings, path segments, OAuth state parameters and JWT segments without percent-escaping. The text is converted to UTF-8 first, so any script or emoji encodes correctly.

How to use Base64URL Encode

  1. Open Base64URL Encode in the Toolbox101 app.
  2. Paste the string you want to make URL-safe into the Input box.
  3. Read the result in the Output box; it uses - and _ and has no trailing =.
  4. Click Copy and drop the value into a query string, URL or JWT segment.

Worked example

Base64URL Encode returns the output below for this input.

Input

hello??

Output

aGVsbG8_Pw

Check it yourself: open Base64URL Encode and enter the same input.

Frequently asked questions

What is the difference between Base64 and Base64URL?

Only the alphabet and padding: Base64URL writes + as -, / as _, and omits trailing = padding. Packing is identical, both decode to the same bytes, and the length grows by about a third in either case. The URL-safe alphabet exists because +, /, and = are reserved or awkward inside URLs, and some systems mangle them.

Where is Base64URL encoding actually used?

Mostly in JSON Web Tokens: the header, payload, and signature are three Base64URL strings joined by dots. You also meet it in OAuth state parameters, signed URLs, and anywhere a compact value must survive URLs, headers, and copy-paste unmodified. Padding is dropped because = creates parsing friction in query strings and some systems trim it.

Can the regular Base64 Decode tool read Base64URL?

Here, yes: the Base64 Decode tool in this app accepts both alphabets and missing padding, so Base64URL pastes straight in. Many other decoders do not. The browser's atob, for one, rejects - and _ and needs the alphabet swapped back first.

What characters can appear in Base64URL output?

Only A–Z, a–z, 0–9, -, and _: 64 symbols in total. There is no +, /, or = padding, and every character is unreserved in URLs per RFC 3986, so the encoded value needs no percent-escaping and survives chat apps and HTML forms that would otherwise mangle it.

Use Base64URL Encode now

Runs in your browser. Nothing you type is uploaded.