Reading the contents of a JWT token, inspecting an encoded HTTP header or decoding an image embedded in CSS: Base64 decoding is a daily operation for developers. An online tool makes this operation instantaneous and code-free.

Base64 decoding is the reverse of encoding. The algorithm takes an ASCII string containing only Base64 alphabet characters (A-Z, a-z, 0-9, +, /) and = padding characters, then reconstructs the original bytes. If the string contains invalid characters or the padding is incorrect, decoding fails. Note that Base64url (used in JWTs) replaces + with - and / with _ for URL compatibility.

πŸ“ Formula

Decoded size = (Base64 length Γ— 3/4) - padding

πŸ“Š Reference table

Base64 encoded Decoded text
SGVsbG8= Hello
SGVsbG8gV29ybGQ= Hello World
dXNlcjpwYXNzd29yZA== user:password
eyJhbGciOiJIUzI1NiJ9 {"alg":"HS256"}
VG9vbFNtYXJ0bHk= ToolSmartly

πŸ’‘ Practical examples

Example 1: decode a JWT token A JWT consists of 3 parts separated by dots. Copy the 2nd part (payload), paste into the Base64 decoder and read the JSON content: sub, iat, exp, roles…
Example 2: read an Authorization header If you see Authorization: Basic dXNlcjpwYXNzd29yZA==, decode the part after 'Basic' to get the clear-text credentials: user:password.
Example 3: extract an embedded image A src="data:image/png;base64,iVBORw..." contains an encoded image. Copy the part after the comma, decode to binary and save as a .png file.