Skip to content
ByteMath

How do I decode a Base64 string or a JWT payload?

Paste standard or URL-safe Base64, with or without padding, and get the decoded UTF-8 text. The sample decodes a JWT payload. Runs entirely in your browser.

Last updated:

Inputs

Output

{"user":"ada","role":"admin","exp":1798761600}
Input size
62 B
Output size
46 B
Records
–
Output vs input
74 %

Results are engineering estimates for planning. Final designs must follow your local code and be checked by a qualified professional.

This scenario at a glance

Input
ConversionBase64 → text
CSV delimiterComma (,)
InputeyJ1c2VyIjoiYWRhIiwicm9sZSI6ImFkbWluIiwiZXhwIjoxNzk4NzYxN…
Calculated
Output{"user":"ada","role":"admin","exp":1798761600}
Input size62 B
Output size46 B
Records–
Output vs input74 %

Engineering notes for this workload

Decoding Base64 is a common debugging step: inspecting a JSON Web Token, reading a data URL, checking an email attachment header or verifying what a webhook actually sent. Paste the encoded string and the tool returns the decoded text.

The sample is the middle part of a JWT. A JWT has three Base64url-encoded parts separated by dots: header, payload and signature. Decoding the payload shows the claims, here a user, a role and an exp expiry timestamp in Unix seconds. Copy only the part between the two dots; the signature part is binary and does not decode to readable text.

The decoder accepts both standard Base64 (+ and /) and the URL-safe variant (- and _), and adds missing = padding automatically, because JWTs and many URL parameters omit it. Whitespace and line breaks, which MIME encoders insert every 76 characters, are ignored.

Decoding does not verify anything. A decoded JWT payload tells you what the token claims, not whether it is genuine: only checking the signature with the issuer's key does that. Never trust decoded claims on the client for authorization decisions; verify tokens on the server.

If the result shows an error, the input may not be text at all. Images, PDFs and compressed data decode to binary bytes that are not valid UTF-8; the decoder reports that instead of printing garbled characters. For binary data, decode to a file with a command-line tool such as base64 -d.

Tokens and payloads often contain sensitive data, such as user IDs, emails and session information. This tool decodes locally in your browser, and nothing you paste is transmitted or stored.

If the decoded text is JSON, paste it into the formatter on this site to pretty-print and validate it in one more step, which makes nested claims, arrays and timestamps much easier to read and compare.

Reference table

Data format reference
FormatStandardKey rules
CSVRFC 4180Fields with delimiter, quote or newline are quoted; quotes doubled ("")
CSV (Excel DE/FR/ES)Locale defaultSemicolon delimiter because comma is the decimal separator
JSONRFC 8259UTF-8, double-quoted keys and strings, no trailing commas, no comments
Base64RFC 4648 §4A–Z a–z 0–9 + /, = padding, 4 characters per 3 bytes (+33 %)
Base64urlRFC 4648 §5- and _ instead of + and /, padding often omitted (JWT)

All conversions on this site run locally in your browser.

Questions about this scenario

How do I decode a JWT?

Copy the payload, the part between the two dots, and Base64url-decode it. This shows the claims but does not verify the signature.

What is the difference between Base64 and Base64url?

Base64url replaces + and / with - and _ so the result is safe in URLs, and usually omits = padding.

Why does my Base64 decode to an error?

The data may be binary, such as an image or compressed file, rather than UTF-8 text, or the string may be truncated.