ScriptMonsters
Free online text case converter and utility tools

Base64 Encode & Decode

Encode text or files to Base64 and decode Base64 back to text — UTF-8 safe, with URL-safe output option.

How to use the Base64 Encode & Decode

  1. Choose the Encode or Decode tab.
  2. Paste your text (or drop a file) into the input.
  3. The converted result appears instantly below.
  4. Toggle "URL-safe" if you need the output for a query string, then Copy.

Examples

InputOutputNotes
Hello, World!SGVsbG8sIFdvcmxkIQ==Encode
SGVsbG8sIFdvcmxkIQ==Hello, World!Decode
caféY2Fmw6k=UTF-8 multi-byte characters handled correctly

How Base64 works

Base64 takes 3 bytes (24 bits) of input and splits them into four 6-bit numbers, each mapped to one character of the 64-character alphabet. The output is always about 33% larger than the input. Decoding reverses the process.

Common uses

  • Data URLs: data:image/png;base64,iVBOR...
  • Embedding attachments in JSON APIs
  • HTTP Basic Auth headers
  • Storing binary blobs in text-only databases or cookies

Standard vs URL-safe

StandardURL-safe
Char 62+-
Char 63/_
Padding=often omitted

Frequently asked questions

What is Base64 encoding?

Base64 represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It lets you embed images, files or non-ASCII text in contexts that only accept text, such as JSON, XML, data URLs and email.

Does Base64 encrypt data?

No. Base64 is encoding, not encryption. Anyone can decode it. Never use it to protect passwords or secrets.

Why does my encoded string end with = signs?

The = is padding. Base64 works in 3-byte groups; when the input length is not a multiple of 3, one or two = characters pad the final group.

What is URL-safe Base64?

A variant that replaces + with - and / with _ so the string can be used in URLs and filenames without percent-encoding. Padding is often omitted too.

Can I Base64-encode an image?

Yes. Drop an image file into the input and the tool returns a Base64 string (and a ready-to-use data URL) that you can paste into CSS or HTML.

Related searches

base64 encodebase64 decodebase64 encode decode onlinebase64 to text converterbase64 encode utf-8url safe base64 encodedecode base64 string onlineimage to base64 converter

Related tools