devjar tools
English

Base64 Encode / Decode

Paste and it converts right away.

Direction

Output


      

How to use

  1. Choose “Encode” or “Decode” at the top.
  2. Paste text or a Base64 string and the result appears immediately. Use “Copy” to take it.
  3. For values that go into URLs or file names, turn on “URL-safe Base64”. It uses - and _ instead of + and / and drops the trailing =.

Encoding “Hello, World!” gives SGVsbG8sIFdvcmxkIQ==. An emoji such as 👋 is four UTF-8 bytes and becomes 8J+Riw==. When decoding, standard and URL-safe forms, strings without = padding and strings broken over several lines are all accepted.

FAQ

Is Base64 encryption?

No. Base64 only rewrites bytes with 64 printable characters, and anyone can reverse it. Never use it to hide passwords or personal data.

Why does btoa fail on my text?

The browser’s btoa only accepts Latin-1 characters. This tool converts your text to UTF-8 bytes first, so accents, Cyrillic, Chinese and emoji encode and decode correctly.

Can I decode an image data URL?

The leading “data:…;base64,” part is removed automatically. Binary data such as an image cannot be shown as text, so the tool tells you its size in bytes instead.

Why is the output longer than the input?

Base64 writes every 3 bytes as 4 characters, so the result is about 33% longer, plus up to two = signs of padding.