Skip to content

URL Safe Base64 Encoder / Decoder

Encode and decode Base64 using the URL-safe alphabet (RFC 4648 §5) — replaces + with - and / with _ so output is safe in URLs, filenames, and JWTs without percent-encoding.

Updated

What is the URL Safe Base64 Encoder / Decoder?

How it works

Examples

Encode plain text

Hello, World!
SGVsbG8sIFdvcmxkIQ

Encode a URL string

https://example.com/path?q=1
aHR0cHM6Ly9leGFtcGxlLmNvbS9wYXRoP3E9MQ

Encode a JSON payload (JWT-style)

{"id":1,"role":"admin"}
eyJpZCI6MSwicm9sZSI6ImFkbWluIn0

Decode a Base64url token

eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIn0
{"sub":"1234567890","name":"John Doe"}

Standard vs URL-safe comparison

{"scope":"read+write","path":"/api/v1"}
eyJzY29wZSI6InJlYWQrd3JpdGUiLCJwYXRoIjoiL2FwaS92MSJ9

Frequently asked questions