Free Base64 Encoder & Decoder
Encode any text or file to Base64, or decode Base64 back. UTF-8 safe, supports URL-safe variant, file uploads for binary data. Everything runs locally.
Output will appear hereFrequently asked questions
What is Base64?
Base64 is a binary-to-text encoding that represents binary data using 64 printable ASCII characters. It is used to embed images in HTML/CSS (data URIs), in JWT tokens, email attachments (MIME), and anywhere binary data must travel through a text-only channel.
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode it instantly. Never use Base64 to hide passwords or secrets — use proper encryption like AES.
What is URL-safe Base64?
Standard Base64 uses '+', '/', and '=' which have special meaning in URLs. URL-safe Base64 replaces '+' with '-', '/' with '_', and often drops '=' padding. Used in JWTs and OAuth flows.
Why is encoded text 33% larger?
Base64 uses 4 ASCII characters to represent 3 bytes of binary, increasing size by 33%. This is the unavoidable cost of representing binary as text.
Encode and decode Base64 — text, files, images, and data URIs. URL-safe variant, MIME line-wrapping, and image preview on decode.
How to use
- 1Pick mode: Encode or Decode.
- 2Paste text, or upload a file.
- 3For URL-safe variant, toggle the option.
- 4For images: decode shows a live preview.
- 5Copy or download the result.
Why use this tool
- Handles text + files + images.
- URL-safe variant for JWTs and OAuth flows.
- Image preview after decode confirms the file is valid.
Real-world examples
Inline image in CSS
PNG file → Base64 data URI → paste into CSS for inline image (no separate file download).
JWT decoding
Each JWT segment is base64url-encoded — decode them to see header / payload contents.
Email attachment decoding
Paste raw MIME-encoded attachment → see original text or download original file.