Encode text or files to Base64, or decode Base64 back to text and files. Instant, free, runs entirely in your browser — nothing is uploaded to any server.
Plain TextInput
↓
Base64 OutputOutput
Input: 0 chars
Output: 0 chars
Size ratio: —
Encoding: UTF-8
📁
Click to choose a file or drag and drop here Images, PDFs, text files, any file type
Base64 OutputOutput
Paste Base64 to decode to fileInput
Common Base64 Examples
Hello World
Classic beginner example
SGVsbG8sIFdvcmxkIQ==
URL Encoding
Encode a URL in Base64
aHR0cHM6Ly9nb3phcHRvb2xzLmNvbQ==
JSON Data
Encode JSON for API use
eyJuYW1lIjoiSm9obiIsImFnZSI6MzB9
HTTP Auth
Basic auth header encoding
dXNlcjpwYXNzd29yZDEyMw==
SQL Query
Encode database queries
U0VMRUNUICogRlJPTS4uLg==
Decode Example
Click to decode this
→ Hello, World!
About Base64
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 printable ASCII characters. It's widely used to transmit data over media that only support text.
Every 3 bytes of input produces 4 Base64 characters, making encoded output approximately 33% larger than the original.
Encodes any binary data as plain text
Uses characters A–Z, a–z, 0–9, +, /
Padding with = signs to fill blocks
Defined by RFC 4648
Common Uses of Base64
HTTP Basic Auth — credentials encoded as Base64 in Authorization header
Email attachments — MIME standard uses Base64 for binary files
Data URLs — embed images directly in HTML/CSS as Base64
JSON APIs — pass binary data in JSON payloads
JWT tokens — JSON Web Tokens use Base64url encoding
Cookies — store complex data in cookies safely
XML — embed binary data in XML documents
FAQs
No. Base64 is encoding, not encryption. Anyone can decode Base64 data without a key. It's designed to safely transmit binary data as text, not to hide or secure it. Never use Base64 as a security measure.
Base64 encodes 3 bytes into 4 characters. If the input isn't divisible by 3, padding characters (=) are added to complete the final block. One = means 1 byte of padding, two == means 2 bytes of padding.
Yes — completely. This tool runs 100% in your browser using JavaScript. Your data is never sent to any server. Nothing is stored, logged, or transmitted. Everything happens locally on your device.
Yes — click the "File / Image" tab, select any file, and the tool converts it to Base64 instantly. You can then copy the output to embed images in HTML/CSS using data URLs, or use the Base64 in APIs and email systems.
Standard Base64 uses + and / characters which are not URL-safe. Base64url replaces + with - and / with _, making it safe to use in URLs and filenames. JWT tokens use Base64url encoding.