All generators

Web

Base64 Encoder / Decoder

Encode plain text to Base64 or decode a Base64 string back to readable text. Supports both standard and URL-safe Base64 formats.

Encoding input

Generated output

Enter text or a Base64 string to see the result.

How it works

Base64 encoding converts binary data (or text) into a string of 64 printable ASCII characters. Every 3 bytes of input become 4 Base64 characters, making the output approximately 33% larger than the input.

Standard Base64 uses the characters A–Z, a–z, 0–9, +, and /. URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL-reserved characters. Both variants use = as padding to ensure the output length is a multiple of 4.

Practical example

Encoding the text "Hello, World!" in standard Base64 produces: SGVsbG8sIFdvcmxkIQ==.

URL-safe Base64 of the same string is identical here, but for binary data containing + or / in the output the two formats would differ.

Frequently asked questions

Answers to common questions about this generator and how it works.

Is Base64 a form of encryption?

No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string without a key. It is used to safely represent binary data in text contexts, not to protect data.

Where is Base64 commonly used?

Common uses include embedding images in HTML or CSS (data: URIs), encoding email attachments (MIME), passing binary data in JSON APIs, encoding credentials in HTTP Basic Authentication headers, and storing binary data in databases that only support text.

Why does Base64 have padding characters (==)?

Base64 processes 3 input bytes at a time. If the input length is not divisible by 3, the last group is padded with one or two = characters to make the output length a multiple of 4.

What is the difference between standard and URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces these with - and _ so the encoded string can be safely included in a URL path or query parameter without percent-encoding.

Can I use this to encode binary files?

This tool encodes text input only. For binary file encoding, you would need a tool that accepts file input and reads the raw bytes.

Related generators

Explore other generators that pair well with this one.

URL Encoder / Decoder

Percent-encode URLs and query strings or decode them back.

Token Generator

Generate secure API tokens, keys, and random secrets in hex or base64 format.

Hash Generator

Generate SHA-256, SHA-1, or MD5 hashes from any text.