About the Base64 Encoder & Decoder
Tezmy's Base64 tool converts text to Base64 and Base64 back to text instantly. It handles every language and emoji correctly (many simple tools break on non-English characters), supports the URL-safe Base64 variant used in JWTs and web links, and can turn any file into a Base64 data URL you can paste into HTML, CSS or JSON. Decoding also accepts data URLs and ignores line breaks. Everything runs in your browser, so tokens and private data never leave your device.
Updated October 2026
How to use the Base64 Encoder & Decoder
- 1Choose Encode or Decode.
- 2Type or paste your text or Base64 into the left box.
- 3Copy the result from the right box.
- 4To encode a file, press “Encode a file” and pick it.
What Base64 is used for
- Embedding small images or fonts directly in HTML and CSS as data URLs.
- Sending binary data inside JSON, XML or email.
- HTTP basic authentication headers.
- Parts of JSON Web Tokens (JWTs), using the URL-safe variant.
Base64 is not encryption
Base64 only changes how data looks; anyone can decode it in a second. Never use it to hide passwords or secrets. To create a fingerprint of data, use a hash with the Hash Generator; to protect data, use real encryption.
Standard vs URL-safe
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant uses - and _ instead and often drops the = padding. Choose URL-safe for tokens and links, and standard for most other uses.
Files to data URLs
Pick a small file, like an icon or logo, to get a data URL that starts with data:image/png;base64,. Paste it into an <img> tag or CSS background to avoid an extra download. Base64 makes files about a third bigger, so it's best for small files only. Everything runs in your own browser, so your data is never uploaded, and it works on phones, tablets and computers with nothing to install.
Why Base64 output is bigger
Base64 uses only 64 safe characters, so every 3 bytes of data become 4 characters. That makes encoded data about 33% larger than the original. It's a fair trade when you need to send binary data through systems built for text, but avoid it for large files. When a token looks like three Base64 parts, open it in the JWT Decoder, and encode the web address parts with the URL Encoder & Decoder.
Features
- Full UTF-8 and emoji support
- URL-safe Base64 option
- File to Base64 data URL
- Accepts data URLs when decoding
- Clear error messages
- Private: nothing is uploaded
Frequently asked questions
What is Base64?
Base64 is a way to write any data using only 64 safe characters (A–Z, a–z, 0–9, + and /). It's used to put binary data like images inside text formats such as email, JSON, HTML and CSS.
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
What is URL-safe Base64?
It replaces + with - and / with _ and usually drops the = padding, so the result can be used in web addresses and file names. JWT tokens use this variant.
Why does decoding say “binary data”?
The Base64 decodes to bytes that aren't readable text, for example an image or a zip file. That's normal for encoded files.
Why is Base64 bigger than the original?
Every 3 bytes become 4 characters, so Base64 is about 33% larger than the original data.
How do I decode a Base64 string?
Paste it into the box and choose Decode. The original text appears instantly; data URLs and line breaks are handled automatically.
Why does my decoded text look like random symbols?
The Base64 contained binary data, like an image or a zip file, not text. Only text can be shown as readable characters.
Can I convert an image to Base64?
Yes. Use the file option to turn an image into a Base64 data URL you can copy.