Base64 Decoder — Decode Any Base64 String Online
FreeDecode Base64 strings to text or download as a file. Supports standard and URL-safe Base64. Instant, free, no upload required.
What's next
Settings guide
Output format:
- ·Text (UTF-8) — Decodes to a readable string. Use when the original content was text, JSON, XML, or any other character data.
- ·Binary / file download — Downloads the decoded bytes as a file. Use when the original content was an image, PDF, ZIP, or other binary format.
URL-safe Base64 detection:
The decoder automatically detects whether the input uses standard (+ and /) or URL-safe (- and _) encoding. Both are handled without any setting change. Padding characters (=) are optional — the decoder handles padded and unpadded input.
Format comparison
Decoding Base64 vs decoding a JWT: A JWT has three Base64url-encoded segments separated by dots (header.payload.signature). Pasting a full JWT here decodes only the raw bytes of the string. For a structured view of all three JWT segments with claim names and expiry parsing, use the dedicated JWT Decoder.
Base64 decoder vs browser DevTools: Modern browsers decode Base64 in the DevTools console: atob("...") for standard Base64, or a custom function for URL-safe Base64. The online decoder is faster for large strings, handles URL-safe automatically, and can output binary as a downloadable file — things atob() cannot do directly.
How it works
Detect encoding variant
The input is scanned for URL-safe characters (- and _). Standard or URL-safe mode is applied automatically. Whitespace and line breaks are stripped before decoding begins.
Validate the string
The string length and padding are checked. Base64 strings must have a length that is a multiple of 4 (with padding) or the decoder calculates the correct length without it.
Decode groups
Every 4 Base64 characters are converted back to 3 bytes of original data. The character-to-6-bit mapping is reversed, and the bits are reassembled into bytes.
Output
Decoded bytes are displayed as text (UTF-8) or offered as a binary file download. If the decoded content is valid JSON, it is automatically formatted for readability.
About this format
A Base64 string in an API response, a JWT token, an email attachment, or a data URI all encode something you cannot read until you decode it. Paste the encoded string and the original content — text, JSON, binary data — is immediately visible or available for download.
Debugging use cases: reading the payload of a JWT without a dedicated JWT tool, inspecting what is inside an HTTP Basic Auth header, viewing the raw bytes of a data URI image, or reading a MIME-encoded email attachment.
The decoder handles both standard Base64 (`+` and `/`) and URL-safe Base64 (`-` and `_`) automatically — no manual selection required for most inputs.