Base64 Encoder / Decoder Online Free
Encode text to Base64 or decode Base64 strings back to readable text instantly. Supports standard and URL-safe Base64. No signup, runs entirely in your browser.
Base64 Encoder / Decoder
How to Use the Base64 Encoder / Decoder
- 1Paste or type the text you want to encode or decode into the input box.
- 2Click Base64 Encode to convert your text to a Base64 string, or Base64 Decode to convert a Base64 string back to plain text. The result appears instantly.
- 3Click Copy to copy the output to your clipboard, ready to paste anywhere.
- 4To decode a JWT token, copy the middle segment (between the two dots) and click Base64 Decode to read its payload.
Common Uses for Base64 Encoding
Base64 is widely used wherever binary data needs to travel through systems designed for text. Below are the most common real-world scenarios.
Base64 Use Cases
Embed Images in HTML/CSS
Base64 is used to embed small images or fonts directly in HTML or CSS as data URIs (data:image/png;base64,...). This eliminates a network request for small assets and is common in email templates.
Decode JWT Tokens
JSON Web Tokens (JWTs) use Base64url encoding. Copy the middle segment of a JWT (between the two dots) and decode it here to read its payload claims — issuer, subject, expiry, and custom fields.
Email MIME Attachments
MIME email attachments are Base64-encoded so binary files can travel safely over SMTP, which was designed for 7-bit ASCII text. If you see long Base64 blocks in raw email source, that is the attachment body.
HTTP Basic Auth Headers
HTTP Basic Authentication encodes credentials as Base64: username:password → Base64 → sent in the Authorization header. Use this tool to inspect or construct Basic Auth headers when testing APIs.
API Responses & Payloads
Some APIs return binary data or structured blobs as Base64 strings inside JSON responses. Decode these here to inspect the raw content without writing code.
Config File Secrets
Environment variables and config files sometimes store secrets as Base64 to avoid quoting issues with special characters. Decode them here to verify the original value during debugging.
Frequently Asked Questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents arbitrary binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is not a form of encryption — the data is trivially reversible. Common uses include embedding images or files in JSON or HTML (as data URIs), encoding binary data for transport over systems that handle only text (e.g. email MIME attachments), and passing binary tokens in HTTP headers or cookies.
Does Base64 encoding make data secure?
No. Base64 is an encoding, not encryption. Anyone who sees a Base64 string can immediately decode it — there is no key or secret involved. Do not use Base64 as a security measure. For actual security, use encryption (AES, RSA) or hashing (SHA-256, bcrypt for passwords). Base64 is used purely for safe text transport, not for hiding data.
Why does Base64 output end with = or ==?
Base64 encodes data in 3-byte (24-bit) groups into 4 Base64 characters. If the input length is not a multiple of 3 bytes, padding characters (=) are added to make the output a multiple of 4 characters. One = means one byte of padding was needed; == means two bytes. Some Base64 variants omit padding (URL-safe Base64), but standard Base64 always pads to a multiple of four.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + and / as the 62nd and 63rd characters, which are reserved characters in URLs and can cause issues when embedded in query strings. URL-safe Base64 (also called Base64url) replaces + with - and / with _ so the output can be safely used in URLs and filenames without percent-encoding. JSON Web Tokens (JWTs) use URL-safe Base64 with padding stripped.
What types of data can I Base64 encode?
You can Base64 encode any text string. This tool accepts plain text input and encodes it as UTF-8 Base64. For binary files (images, PDFs, executables), you would need to read the file as binary first — most programming languages have built-in functions for this (e.g. base64.b64encode() in Python, Buffer.from(data).toString("base64") in Node.js).
Is my text stored or sent anywhere?
No. All encoding and decoding runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged, and never stored. Closing the tab discards everything. You can safely encode confidential strings, API keys, or personal data without any privacy concern.