Decode URL-safe Base64 encoded strings back to text

Decode URL-safe Base64 into bytes while restoring omitted padding.

freeworks offlinenothing uploaded
ToolBase64URL Decode
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

URL-safe - and _ map to the standard 6-bit alphabet, missing padding is restored to a multiple of four, and 24-bit groups become bytes. The result can be arbitrary binary.

  • Omitted padding keeps tokens URL-safe.
  • Restoring padding preserves byte boundaries.

Worked example

Decode Base64URL
Decode a URL-safe Base64 string back to text
Input
											SGVsbG8sIFdvcmxkIQ
										
Output
												Hello, World!
											

When to use this

JWTs, URL keys, and WebAuthn or OAuth debugging decode Base64url.

Edge cases

  • Standard + and / are invalid in strict URL-safe mode.
  • One or two missing padding characters need restoration.
  • Binary output can contain nulls and invalid UTF-8.

References