Advertisement — 728×90
code

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 strings — supports Unicode

Text to Encode
Base64 Output

What is Base64?

Base64 is an encoding scheme that represents binary data as ASCII text using 64 printable characters (A–Z, a–z, 0–9, +, /). It's commonly used to embed images in HTML/CSS, encode email attachments (MIME), store binary data in JSON, and pass data through systems that only handle text.

Base64 increases data size by ~33% (every 3 bytes becomes 4 characters). It is NOT encryption — it's trivially reversible. Never use it to "hide" sensitive data. This tool handles Unicode text correctly by using UTF-8 encoding before Base64 conversion.

lightbulb Example
Encode "Hello":
1ASCII bytes: 72 101 108 108 111
2Base64: SGVsbG8=
✓ 5 chars → 8 chars (+60% size)

quizFrequently Asked Questions

What is Base64 used for?
Base64 encodes binary data (images, files, audio) into printable ASCII characters so it can be embedded in text-based formats like JSON, XML, HTML, and email (MIME). It's not encryption — it's encoding. Common uses: embedding images in CSS as data URIs, encoding binary API payloads, and storing binary data in databases that only support text.
Does Base64 increase file size?
Yes, by approximately 33%. Every 3 bytes of binary data become 4 Base64 characters. A 1 MB image encoded as Base64 becomes ~1.37 MB. This overhead is why Base64 is used for convenience (embedding) rather than storage efficiency.
What's the difference between standard Base64 and URL-safe Base64?
Standard Base64 uses + and / characters, which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making it safe to include in URLs and query strings without percent-encoding. Many APIs (like JWT tokens) use URL-safe Base64.
keyboard_arrow_up