Input (Base64url)

Output

Base64 URL Decoding Examples

Paste a Base64url string (using - and _, no = padding required) to decode it back to text. Example:

Decode a Base64url string

Base64url input:

Input

Decoded output:

Output

Click Sample above to load a Base64url example.

What Is Base64 URL Decoding?

Base64url is defined in RFC 4648 Section 5 as a URL- and filename-safe variant of Base64. It uses - instead of + and _ instead of /, and omits = padding. This decoder automatically handles all three differences: it converts -/_ back to +// and re-adds any missing = padding before decoding.

Base64url strings appear in <a href="https://jwt.io/introduction" target="_blank" rel="noopener">JWTs</a>, OAuth 2.0 PKCE challenges, WebAuthn credentials, and URL-safe identifiers. This tool decodes any such string back to its original UTF-8 text. To encode text to Base64url, use the Base64 URL Encoder. For standard Base64 decoding, use the Base64 Decoder.

How to Use This Tool

1

Paste Your Base64url String

Paste the Base64url string into the left editor. It may contain - and _ and does not need = padding. Standard Base64 strings (with + and /) are also accepted. Click Sample to load an example.

2

Read the Decoded Output

The right panel shows the decoded text immediately. The tool automatically normalizes the input: strips whitespace, converts -/_ to +//, and re-adds = padding as needed.

3

Copy or Download

Click <strong>Copy</strong> to put the result on your clipboard, or <strong>Download</strong> to save it as a <code>.txt</code> file. To encode text to Base64url, use the Base64 URL Encoder.

How Base64url Decoding Works

This tool performs three normalization steps before decoding:

Normalization steps

After normalization, the string is standard Base64 and decoded with the browser's built-in atob() function. The raw bytes are then decoded as UTF-8 using TextDecoder, which correctly handles multi-byte Unicode characters.

Frequently Asked Questions

Is my data private?

Yes. Decoding runs entirely in your browser. No data is sent to any server. You can verify this by checking your browser's Network tab while using the tool.

Do I need to add = padding before pasting?

No. This tool automatically calculates and adds any missing = padding based on the input length. Paste the raw Base64url string as-is.

Can I decode standard Base64 here?

Yes. Standard Base64 (with <code>+</code>, <code>/</code>, and <code>=</code>) is also accepted. The tool decodes both formats. For a dedicated standard Base64 decoder, use the Base64 Decoder.

Can I decode JWT payloads here?

Yes. A JWT has three Base64url-encoded parts separated by dots. Copy the middle part (the payload) and paste it here to decode the JSON. The header (first part) can be decoded the same way. The signature (third part) is binary and will not decode to readable text.

What if the output looks garbled?

The input may contain binary data (not text). Binary data decoded as UTF-8 may produce garbled output. If you need to recover a binary file from Base64, use the Base64 to File tool which lets you download the raw bytes.

Related Tools

For the formal specification, see RFC 4648 Section 5. JWT introduction explains how Base64url is used in tokens.