What this tool does
Base64 Encoder and Decoder
Your input is sent to the server for this request and is not saved as a tool content record. Infrastructure logs may still record request metadata, so do not submit secrets.
Base64 Encoder and Decoder converts UTF-8 text to standard Base64 and decodes valid standard Base64 into UTF-8 text.
The strict text decoder does not normalize Base64url, repair missing padding, decrypt content, or process binary file uploads. Base64 is reversible encoding and must not be used to hide secrets.
How to use this tool
How to encode or decode Base64
Paste UTF-8 text to encode or standard Base64 text to decode.
Choose Encode or Decode.
Select Encode or decode and review the result.
If decoding fails, check the alphabet, padding, whitespace, and expected character encoding.
Before and after example
Base64 text encoding example
Input
ScriptZip developer tools
Output
U2NyaXB0WmlwIGRldmVsb3BlciB0b29scw==
Options, errors, and limitations
Base64 format limits and decoding errors
Parent category
Explore the Converter Tools hub
Converters for JSON, CSV, XML, Base64, and URL-encoded content.
Practical guides
Troubleshoot and choose the next step
FAQ
Base64 Encoder and Decoder FAQ
What is Base64 used for?
Base64 converts binary data into a limited text alphabet so it can travel through systems that are designed for text. It is commonly used in email, APIs, data URIs, tokens, and configuration formats.
Is Base64 encryption?
No. Base64 is reversible encoding and provides no confidentiality. Anyone who has the encoded value can usually decode it without a password or key.
Why does Base64 sometimes end with one or two equals signs?
The equals signs are padding used so the encoded output aligns with the Base64 block size. Some protocols omit padding, but a decoder must then know how to restore or interpret the missing padding correctly.
What is the difference between Base64 and Base64url?
Base64url uses a URL safe alphabet, replacing characters that are inconvenient in URLs and often omitting padding. JWT header and payload segments use Base64url rather than the classic Base64 alphabet.
Why does Base64 decoding break with Unicode text?
Base64 works on bytes, not abstract characters. The text must first be encoded into bytes using a character encoding such as UTF 8, and the decoded bytes must later be interpreted using the same encoding.
Can Base64 encode images and other binary files?
Yes. Any sequence of bytes can be Base64 encoded, including images, PDFs, archives, and certificates. The encoded text is larger than the original binary, so it is not a compression method.
Why do I get an invalid Base64 or incorrect padding error?
The input may contain missing padding, invalid characters, line breaks, a different Base64 variant, or truncated data. Confirm whether the source uses standard Base64 or Base64url and whether whitespace should be ignored.
How much larger is Base64 than the original data?
Base64 expands binary data by roughly one third before any surrounding markup or headers. That overhead is one reason large files are usually transferred as binary rather than embedded as Base64 text.
What is a Base64 data URI?
A data URI embeds encoded content directly inside a URL like string, for example an image inside HTML or CSS. It can be convenient for small assets but can increase document size and reduce independent caching opportunities.
Can I decode a JWT with a normal Base64 decoder?
JWT segments use Base64url, so a standard Base64 decoder may fail until URL safe characters and padding rules are handled correctly. Also remember that decoding a JWT does not verify its signature.