Base64 Encoder & Decoder
Encode text or files and recover the original bytes
Drop your file hereTap to choose a file
or click to browse, or paste from the clipboard
Standard and URL-safe alphabets
Work with standard Base64, which uses + and / with = padding, or Base64URL, which uses - and _ and leaves the padding off. The alphabet you choose applies to both encoding and decoding.
Text preview or original bytes
Decoded data that is valid UTF-8 text is shown in the Result box. Anything else, such as an image, a key or compressed data, is offered as a download containing the exact decoded bytes.
Local text and file encoding
Paste text or choose a file of up to 1 MiB and encode it without uploading it.
How to encode or decode Base64
- 1
Choose Standard Base64 or Base64URL to match your data.
- 2
To decode, paste the Base64 text and select Decode.
- 3
To encode, paste plain text or choose a file up to 1 MiB, then select Encode.
- 4
Copy the text result, or download the encoded text or the decoded bytes.
What people use this tool for
- Read the header and payload of a JSON Web Token while debugging sign-in.
- Decode a Base64 field from an API response, a webhook or the source of an email.
- Encode a small image, font or certificate to embed in a test fixture or configuration file.
- Build the value for an HTTP Basic Authorization header from a test account.
Frequently Asked Questions
How do I decode a Base64 string?
Paste the string into the input box, leave the alphabet on Standard Base64 unless the text contains - or _, and select Decode. Readable text appears in the Result box, and other data is offered as a file. Spaces and line breaks inside the string are ignored, and the = padding at the end can be present or missing.
How do I encode text or a file to Base64?
Type or paste the text and select Encode. To encode a file instead, choose it under File to encode, which clears the text box, then select Encode. Text is converted to UTF-8 first, so accents and emoji survive. The output is one continuous line without line breaks or a data: prefix, and can be copied or downloaded as encoded.txt.
What is the difference between Base64 and Base64URL?
They encode the same data with two different characters. Standard Base64 uses + and /, which have special meanings in URLs and filenames, so Base64URL replaces them with - and _ and normally drops the = padding. JSON Web Tokens and many URL parameters use Base64URL. If decoding reports an unexpected character, switch the alphabet and try again.
Can I decode a JWT or a data URI?
Yes, with a little trimming. A JWT is three Base64URL parts joined by dots: select Base64URL and decode the first or second part on its own to read the header or payload as JSON. The tool does not verify the signature. For a data URI, remove everything up to and including the comma after base64 and decode the rest.
Why is there a download but no text?
The decoded bytes are not valid UTF-8 text, or they contain control characters, so there is nothing readable to show. This is normal for images, PDFs, keys and compressed data. Select Download result to save the bytes as decoded.bin, then rename the file with the right extension, such as .png or .pdf, to open it.
Why does decoding fail?
The decoder is strict. It rejects characters from the other alphabet, padding in the wrong place, a length that cannot be valid, and leftover bits at the end, which usually mean the string was cut short or altered. Check that you copied the whole value, without quotes, a prefix or a trailing dot or comma.
Is Base64 a form of encryption?
No. Base64 only rewrites bytes as letters and digits so that they survive systems that expect text. It has no key and anyone can reverse it, so never treat an encoded password or token as protected. It also makes data about a third larger, because every three bytes become four characters.
What are the limits, and is my data uploaded?
Files to encode and decoded results can be up to 1 MiB, and text must fit in 1 MiB once converted to UTF-8. Encoding and decoding use functions built into your browser and files are read locally, so tokens, keys and payloads are not sent to Zutilium.