Base64 Encoding Without Padding

Encode to Base64 without = padding characters. See when padding is optional, how to add it back, and why JWTs omit it.

Part of the free Base64 Encoder. Runs in your browser — nothing is uploaded.

Base64 Encoding Without Padding

The = characters at the end of Base64 only signal how many bytes are in the last group. Many formats, such as JWT and some URLs, leave them off because the decoder can infer the length.

Worked example: With and without padding

Text

ab

Both forms

padded:   YWI=
unpadded: YWI

Practical tip

To restore padding before decoding, append = until the string length is a multiple of 4. Some decoders require this step.

How to use this Base64 Encoder

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

Base64 Encoding Without Padding FAQs

Is unpadded Base64 valid?

It is valid in contexts that allow it, such as Base64URL in JWTs (RFC 7515). Strict RFC 4648 Base64 expects padding.

Why do some decoders fail without padding?

Some implementations require input length to be a multiple of 4. Add = characters to fix it.

More Base64 Encoder pages

Open the full Base64 Encoder tool →