Base64 Decoder & Encoder: decode and encode online
The Base64 Decoder converts Base64 back to readable text, while the encoder converts text to Base64 in standard or URL-safe format. For example, “ZAP-Hosting” becomes “WkFQLUhvc3Rpbmc=”. The result appears as you type, and everything runs locally in your browser.
Built by Jakub Martyniak
Building an API? Host your backend on a VPS with full control.
Input
Result
Paste text or Base64 on the left to see a preview.
Example result
What the conversion looks like in the Base64 Encoder
You enter text, and the tool immediately returns the Base64 string in standard or URL-safe format. It can also turn Base64 back into readable text. The example below is fixed sample text; your output depends on your input.
Example · Text with umlaut, ß and slash
Input
- Text
- GrĂĽĂźe/ZAP?
- Special characters are encoded as UTF-8 first; ĂĽ and Ăź each take up 2 bytes.
Output
- Base64 (Standard)
- R3LDvMOfZS9aQVA/
- Uses + and / with = padding, for JSON, XML, emails, and data URIs.
- Base64 (URL-safe)
- R3LDvMOfZS9aQVA_
- + becomes -, / becomes _, and padding is removed: ready to use in URLs and file names.
- Decoded back
- GrĂĽĂźe/ZAP?
- Decoding gives you back the exact original text, regardless of the variant.
Features
Base64 decoder and encoder in one tool
Decode and encode on one page, with UTF-8, a URL-safe variant, and binary data detection.
Live results without clicking
The result updates with every input—no Convert button needed.
Standard and URL-safe
Encode using +, /, and = padding, or use the URL-safe variant with - and _ and no padding. The decoder accepts both variants.
UTF-8 with accented characters and emojis
Text is converted to UTF-8 before encoding and strictly interpreted as UTF-8 when decoded.
Download binary data
If the decoded result isn’t valid text, you can download the raw data as decoded.bin.
Clear error display
Characters outside the Base64 alphabet or incorrect padding are flagged immediately.
Only in your browser
Free and no sign-up required. Nothing is uploaded; even files are read locally only.
Guide
How to decode and encode Base64 online
From text or a Base64 string to the finished result in five steps.
Step 1
Select mode
Select “Encode” at the top of the tool to convert text to Base64, or “Decode” to convert Base64 back to text.
Step 2
Paste text or Base64
Paste your text or Base64 string into the “Input” field, upload a text file with “Choose file”, or try the tool with “Load example”.
Step 3
Choose variant
When encoding, choose “Standard (+/=)” or “URL-safe (-_)”. When decoding, the tool accepts both variants.
Step 4
Check result
The result appears immediately in the “Result” field and updates as you type. If the Base64 is invalid, you see an error message instead.
Step 5
Copy or download
Copy the result to your clipboard or use “Download” to save it as encoded.txt, decoded.txt or, for binary data, decoded.bin.
Basics
What is Base64?
Base64 represents any data as printable text. Here is what you should know before decoding or encoding Base64.
How Base64 encoding works
Every 3 bytes are split into four 6-bit groups, each represented by one of 64 characters: A–Z, a–z, 0–9, + and /. If bytes are missing at the end, = is used as padding. That makes Base64 about one-third longer than the original.
What Base64 is used for
Base64 lets binary data pass through text-only formats: email attachments (MIME), data URIs in HTML and CSS, JSON and XML payloads, HTTP headers such as Basic Auth, and the URL-safe encoded parts of a JWT.
Base64 is not encryption
Base64 is reversible encoding without a key; anyone can decode it. It does not protect passwords or secrets. For that, you need hashes such as bcrypt.
Decode data URIs
A string such as “data:image/png;base64,iVBOR…” starts with a prefix. Remove everything up to and including the comma, or the decoder will report invalid characters.
Command line
Decode and encode Base64 in the terminal
On your computer or server, these commands perform the same conversion as the tool. The example decodes WkFQLUhvc3Rpbmc= back to ZAP-Hosting.
Linux
echo 'WkFQLUhvc3Rpbmc=' | base64 -d base64 -d input.b64 > output.bin base64 input.txt
macOS
echo 'WkFQLUhvc3Rpbmc=' | base64 -D base64 -D -i input.b64 -o output.bin base64 -i input.txt
Windows (PowerShell)
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('WkFQLUhvc3Rpbmc='))
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('ZAP-Hosting'))
certutil -decode input.b64 output.binDiscover more
More tools
JWT Debugger
Decode, edit, and re-sign JSON Web Tokens, including signature verification for HS256/HS384/HS512 and RS/PS/ES verification with a public key, entirely in your browser.
Built by Jakub Martyniak
Hash Generator (MD5, SHA-1, SHA-256, SHA-512)
NewGenerate MD5, SHA-1, SHA-256, and SHA-512 hashes from text or files and compare checksums. Runs entirely in your browser.
Built by Luca Stanek
Bcrypt Generator & Checker
Generate and verify Bcrypt hashes—entirely in your browser, with an adjustable cost factor.
Built by Rugile Rutkauskaite
JSON Formatter
Format, minify, and validate JSON with syntax highlighting, error messages, and downloads, entirely in your browser.
Built by Jakub Martyniak
URL Encoder & Decoder
Encode and decode URLs and text online: compare encodeURIComponent, encodeURI, and form encoding, with a query parameter table and UTM link builder. Runs entirely in your browser.
Built by Dimitri Heissler
FAQ
Frequently asked questions about the Base64 Decoder
Quick answers about decoding and encoding Base64, files, and privacy.
Select “Decode” at the top of the tool and paste your Base64 string into the “Input” field. The result appears immediately in the “Result” field, with no extra click. From there, you can copy it to your clipboard or save it as decoded.txt using “Download”.
The data is represented using 64 printable characters: A–Z, a–z, 0–9, + and /, with = as padding at the end. Every 3 bytes become 4 characters, so the result is about one-third longer than the original. For example, ZAP-Hosting becomes WkFQLUhvc3Rpbmc=.
No. Base64 is reversible encoding without a key; anyone can decode it immediately. It is therefore unsuitable for passwords and confidential data. Use the Bcrypt Generator to hash passwords and the Hash Generator to create checksums.
The Base64 Decoder is free to use without signing up. Encoding and decoding run directly in your browser using TextEncoder, TextDecoder, btoa and atob. Even a file selected with “Choose file” is read only locally. Your text is not sent to a server.
Standard Base64 uses + and /, with = for padding. URL-safe Base64 replaces + with - and / with _ and omits padding. This turns GrĂĽĂźe/ZAP? into R3LDvMOfZS9aQVA/, or R3LDvMOfZS9aQVA_ in URL-safe format. When decoding, the tool accepts both variants, even without padding.
Paste the Base64 string in “Decode” mode. If the result is not valid UTF-8 text, the tool offers the raw data for download as decoded.bin instead of displaying garbled characters. Then rename the file with the appropriate extension, such as .png or .pdf. There is no preview. Remove any prefix such as “data:image/png;base64,” first.
Use “Choose file” to upload text files such as JSON, configuration files or certificates in text format and encode them directly. The file is read as text, so images and other binary files will not be encoded correctly this way.
Instead of producing broken output, the tool reports characters outside the Base64 alphabet or incorrect padding. Common causes include a truncated string, extra characters introduced when copying, or a data URI prefix. The tool automatically removes leading and trailing whitespace and line breaks when decoding.
Any more questions?
Contact SupportYour API needs a reliable server to deliver its data
A ZAP-Hosting VPS reliably puts your application or project online.
No setup. No risk. Online in seconds.
Looking for more tools? View all developer tools
