Logo

MonoCalc

/

Base64 URL Decoder

Encode/Decode

JWT Mode

Ignore whitespace

URL-decode first

Quick Examples

aGVsbG8gd29ybGQ

โ†’

hello world
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

About This Tool

๐Ÿ”“ Base64 URL Decoder โ€“ Decode Base64url Strings & JWT Tokens

The Base64 URL Decoder converts Base64url-encoded strings back to their original plaintext, JSON, or binary form โ€” entirely in your browser with no data sent to any server. Whether you're inspecting a JWT (JSON Web Token), debugging an OAuth state parameter, or examining an API response, this tool decodes it instantly.

๐Ÿ”ค What Is Base64 URL Encoding?

Base64url is a variant of standard Base64 defined in RFC 4648 ยง5. It uses a URL-safe alphabet by replacing + with - and / with _, and typically omitting the = padding character. This makes it safe to embed in URLs, query strings, HTTP headers, and cookie values without requiring percent-encoding.

โš™๏ธ How Decoding Works

The decoder follows a 5-step normalization process before producing output:

  1. Strip whitespace โ€” removes newlines and spaces (if enabled)
  2. URL-decode โ€” optionally percent-decodes %2B, %2F, %3D
  3. Convert alphabet โ€” replaces - โ†’ + and _ โ†’ /
  4. Re-add padding โ€” appends = or == to make length a multiple of 4
  5. Decode โ€” applies standard Base64 decode and interprets bytes as UTF-8, Hex, or JSON

๐Ÿช™ JWT Token Decoder

Enable JWT Mode to automatically split a JSON Web Token on its . separators into three segments:

Header

Algorithm and token type โ€” e.g., {"alg":"HS256","typ":"JWT"}

Payload

Claims data โ€” subject, issuer, expiry, and custom fields.

Signature

Binary HMAC/RSA signature โ€” shown as raw Base64url. Cannot be decoded to text.

๐Ÿ“ค Output Formats

FormatBest ForExample Output
UTF-8 TextPlain text, JSON payloads, tokenshello world
Hex DumpBinary data, encryption keys, certificates68 65 6c 6c 6f
JSON Pretty-printAPI responses, JWT payloads{ "sub": "123" }

๐Ÿ”„ Auto-Detect & Input Variants

The decoder handles three common input variants automatically:

  • Base64url โ€” the canonical RFC 4648 ยง5 format with - and _
  • Standard Base64 โ€” automatically converts + and / before decoding
  • URL-encoded Base64 โ€” percent-decodes %2B and %2F before processing

๐Ÿ›ก๏ธ Privacy & Security

All decoding runs 100% client-side in your browser. No input data is ever transmitted to a server. This makes the tool safe for decoding sensitive JWTs, API keys, session tokens, and OAuth state parameters. Remember that Base64url encoding provides no encryption or confidentiality โ€” anyone with the encoded string can decode it.

๐Ÿงช Common Use Cases

  • Decoding JWT headers and payloads to inspect claims (sub, exp, iss)
  • Debugging OAuth 2.0 / OIDC access tokens and state parameters
  • Inspecting Base64url-encoded API keys or session identifiers
  • Examining URL-safe encoded hashes, nonces, and cryptographic salts
  • Decoding binary attachments or file data embedded in API responses

โš ๏ธ Padding & Error Handling

Base64url strings often omit the trailing = padding. The decoder automatically calculates and adds the correct number of padding characters (0, 1, or 2) before decoding. If the decoded bytes contain invalid UTF-8 sequences, the tool warns you and suggests switching to Hex Dump mode to view the raw bytes.

Frequently Asked Questions

Is the Base64 URL Decoder free?

Yes, Base64 URL Decoder is totally free :)

Can I use the Base64 URL Decoder offline?

Yes, you can install the webapp as PWA.

Is it safe to use Base64 URL Decoder?

Yes, any data related to Base64 URL Decoder only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is Base64 URL decoding?

Base64 URL decoding converts a Base64url-encoded string back to its original plaintext or binary form. Base64url uses '-' instead of '+' and '_' instead of '/', making it safe for URLs, HTTP headers, and JWT tokens without percent-encoding.

How does this Base64 URL Decoder work?

The tool normalizes the input by replacing '-' with '+' and '_' with '/', adds any missing '=' padding, then applies standard Base64 decoding. The result is displayed as UTF-8 text, a hex dump, or pretty-printed JSON depending on your chosen output format.

What is the difference between Base64 and Base64 URL encoding?

Standard Base64 uses '+' and '/' characters which are reserved in URLs and must be percent-encoded. Base64 URL (RFC 4648 ยง5) replaces these with '-' and '_', allowing the encoded string to appear directly in URLs and HTTP headers without modification.

Can I decode JWT tokens with this tool?

Yes. Enable JWT Mode to split the token on '.' separators and decode the header and payload segments separately. Each segment is decoded and pretty-printed as JSON. Note that the signature segment is binary and displayed as raw Base64url.

What happens if my input has incorrect padding?

The tool automatically detects and corrects missing '=' padding characters. It calculates the required padding based on the input length and appends '=' or '==' as needed before decoding.

Is decoded data ever sent to a server?

No. All decoding is performed entirely in your browser using JavaScript. No data leaves your device, making this tool safe for sensitive tokens, API keys, and JWTs.