Base64 Decoder
Paste a Base64 string to decode it as UTF-8 text, or download the result when it is a binary file such as an image or PDF. The decoder accepts standard and URL-safe alphabets, ignores line breaks and points to the exact position of an invalid character or bad padding. Common file types are recognised from their signature.
How to use the Base64 Decoder
- Paste Base64, Base64URL or a full data: URL.
- Read the decoded text, or see the binary file notice.
- Fix any reported invalid character at the position shown.
- Use Download file to save decoded binary data.
Features
- Standard and URL-safe alphabets, with or without padding
- Ignores whitespace and accepts data: URLs
- Precise errors for invalid characters, padding and length
- Detects PNG, JPEG, GIF, WebP, PDF, ZIP and GZIP data
- Image preview and hex dump for binary output
Benefits
- Inspect encoded email attachments, tokens and API fields
- Recover files from data URLs
- Private: decoding happens on your device
Frequently asked questions
Why do I see a "binary data" message instead of text?
The decoded bytes are not valid UTF-8 text or contain control characters, which usually means the data is a file. Use Download file to save it.
What does "4n+1 characters" mean?
Base64 encodes 3 bytes into 4 characters, so a valid string can never be one character longer than a multiple of four. The data was probably cut off when copying.
Can it decode JWT parts?
Yes, JWT segments are Base64URL. For a full breakdown with expiry times use the JWT Decoder tool.
Related tools
- JSON Formatter — Beautify or minify JSON with 2-space, 4-space or tab indents, sort keys and browse it as a collapsible tree.
- JSON Validator — Check JSON syntax as you type, see the exact line and column of any error and get warnings for duplicate keys.
- XML Formatter — Pretty-print or minify XML with comments, CDATA and DOCTYPE support, plus a well-formedness check with error positions.
- HTML Formatter — Beautify HTML with your choice of indentation and line wrapping, including inline <script> and <style> blocks.
- CSS Formatter — Beautify minified CSS into readable rules with custom indentation, brace style and one selector per line.
- JavaScript Formatter — Beautify JavaScript with configurable indentation, brace style and line wrapping to make minified code readable.