Practical guides on IT careers, blogging & online income for beginners.

Base64 Encoder & Decoder

Paste text to encode it, or paste Base64 to decode it. It handles emoji and Indian scripts correctly, accepts URL-safe Base64, and can turn files and images into data URIs.

  • Free
  • No sign-up
  • Runs in your browser
Base64 result

Everything runs in your browser. What you type here is never uploaded, stored or sent anywhere.

What is Base64?

Base64 is a way to write binary data using only 64 safe, printable characters: A to Z, a to z, 0 to 9, plus + and /. It is used wherever binary data has to travel through something built for text, such as email attachments, JSON fields, HTML and CSS data URIs, and HTTP Basic Auth headers.

It is encoding, not encryption. Anyone can decode Base64 in a second, so never use it to hide a password or a secret. It also makes data about 33 percent bigger, which is the price of making it text-safe.

Most online tools break on non-English text because the browser's built-in btoa() only understands Latin-1. This one converts your text to UTF-8 first, so a string like नमस्ते ₹100 round-trips correctly. Working with a JWT or an API payload? Format the decoded result with the JSON Formatter, or generate IDs to encode with the UUID Generator.

How to encode or decode Base64

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Paste your input. The result appears as you type. To encode a file or image, click Encode a file.
  3. For links, filenames and JWTs, tick URL-safe so the output uses - and _ instead of + and /.
  4. Click Copy, or Download file if the decoded result is an image or other binary file.

Where Base64 is used

  • Embedding a small image or font in HTML or CSS as a data URI.
  • Reading the payload of a JWT (the middle part is URL-safe Base64 JSON).
  • Sending binary data inside a JSON API request or response.
  • Reading and writing the Authorization header for HTTP Basic Auth.
  • Checking what is hiding inside an encoded config value or log entry.

Frequently asked questions

Is Base64 encryption?

No. It is a reversible encoding with no key, so anyone can decode it. Never use it to protect passwords or private data. If you need secrecy, use real encryption.

Why does my decoded text look like garbage?

Either the input is not text (it may be an image or a compressed file), or it was encoded in a different character set. If the bytes are not valid UTF-8, the tool tells you it is binary and offers a file download instead of showing broken characters.

What is URL-safe Base64?

It swaps + for - and / for _, and often drops the = padding, so the result can sit in a URL or filename without being escaped. JWTs use this form. The decoder here accepts both forms automatically.

Why does Base64 end with = or ==?

Base64 works in groups of three bytes. When the data does not fill the last group, one or two = characters pad it out to a multiple of four. Many systems accept it without padding, which is why there is a No padding option.

Can I convert a Base64 string to an image?

Yes. Switch to Decode and paste the string, with or without the data:image/png;base64, prefix. If it is a PNG, JPG, GIF or WebP, a preview appears and you can download it as a file.

Is my data uploaded?

No. Encoding and decoding happen in your browser and nothing is sent to a server. That includes files you choose.