📢 Advertisement — Leaderboard (728×90)

Free Base64 Encoder & Decoder Online

Instantly encode any text to Base64 or decode any Base64 string back to plain text. Supports standard and URL-safe Base64, live mode, and multiple character encodings. Free, private, no sign-up required.

📥 Plain Text (Input) 0 chars
📤 Base64 Output
⚠️ Invalid Base64 0 chars
📥
0 B
Input Size
📤
0 B
Output Size
📈
0%
Size Increase
🔣
0
Padding Chars
📢 Advertisement — Rectangle (336×280)

📖 What is Base64?

Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of 64 printable ASCII characters. The name "Base64" comes from the fact that 64 characters are used to represent the data.

It is widely used when there is a need to encode binary data that needs to be stored or transferred over media that only support text — such as email attachments, embedding images in HTML/CSS, storing data in JSON, and passing data in URLs.

🔧 Common Use Cases

Use Case Example Why Base64?
Email Attachments MIME encoding Email systems only support 7-bit ASCII text
Embed Images in HTML src="data:image/png;base64,..." Avoids separate HTTP requests for small images
CSS Background Images url("data:image/...") Inline small icons without extra file requests
JSON Data Transfer Binary data in API responses JSON only supports text — binary must be encoded
HTTP Basic Auth Authorization: Basic dXNlcjpwYXNz Encodes username:password for HTTP headers
URL Parameters Passing binary data in URLs URL-safe Base64 avoids special character issues
JWT Tokens JSON Web Token payload Token header and payload are Base64Url encoded
Cryptographic Keys PEM files, certificates Binary keys stored as readable text strings

🧮 How Does Base64 Work?

Base64 works by converting every 3 bytes of input into 4 Base64 characters. Here is a step-by-step example of encoding the word "Man":

Step Input Binary Base64 Output
Characters M a n
ASCII Values 77, 97, 110 01001101 01100001 01101110
Split into 6-bit Groups 010011 010110 000101 101110
Decimal Values 19, 22, 5, 46
Base64 Characters T W F u = TWFu

✅ So "Man" encodes to "TWFu" in Base64. Base64 always increases the size of data by approximately 33% because 3 bytes become 4 characters.

📖 How to Use the Base64 Encoder & Decoder

1

Choose Encode or Decode Mode

Click the Encode tab to convert plain text → Base64, or the Decode tab to convert Base64 → plain text.

2

Set Your Options

Enable URL-Safe mode if your output will be used in a URL. Enable Line Breaks for MIME-compatible output. Leave Live Mode on for instant results as you type.

3

Paste or Type Your Input

Type or paste your text into the input box. If Live Mode is enabled, the result appears instantly. Otherwise click the Encode / Decode button.

4

Copy Your Output

Click Copy Output to copy the result to your clipboard. Use the Swap button to flip input and output if you want to re-encode or re-decode.

📢 Advertisement — Leaderboard (728×90)

❓ Frequently Asked Questions

What is Base64 encoding? +
Base64 is an encoding scheme that converts binary data into a text-only format using 64 printable ASCII characters. It is used when data needs to be sent over systems that only handle text, such as email, URLs, or JSON APIs.
Is Base64 encoding the same as encryption? +
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string instantly using any Base64 decoder — including this tool. It provides zero security. Never use Base64 to protect sensitive passwords or private data.
What is URL-safe Base64? +
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe for use in URLs, filenames, and HTTP headers.
Why does Base64 output end with = or ==? +
Base64 processes input in groups of 3 bytes. If the input is not divisible by 3, padding characters (=) are added to ensure the output length is a multiple of 4. One = means 1 padding byte was needed; == means 2 padding bytes.
How much does Base64 increase the file size? +
Base64 increases the size of the data by approximately 33%. This is because every 3 bytes of input become 4 characters of output (a ratio of 4/3 ≈ 1.33). The size stats above show the exact increase for your input.
Is my data private when using this tool? +
Yes. All encoding and decoding happens 100% inside your browser using JavaScript. Your text is never sent to any server, never stored, and never logged. You can even disconnect from the internet and the tool will still work.