Base64 एनकोडर/डीकोडर

इनपुट

एन्कोड करने के लिए टेक्स्ट दर्ज करें
0 अक्षर

विकल्प

URL-सुरक्षित मोड URL में सुरक्षित उपयोग के लिए + को - और / को _ से बदलता है।

आउटपुट

Base64 एन्कोड परिणाम
0 अक्षर

इस उपकरण के बारे में

Base64 encoding comes up more often than you'd think in development work. I originally created this tool when I needed to quickly encode authentication credentials for HTTP Basic Auth headers during API integration testing. Since then, I've used it for embedding small images in CSS data URIs, encoding JWT payloads for inspection, decoding email attachments, and preparing multipart form data. The tool supports both standard Base64 and URL-safe variants (replacing + and / with - and _), which is crucial when encoding data for URLs or filenames. All processing happens in your browser—no data is uploaded to any server, making it safe for encoding sensitive credentials or customer information.

कैसे उपयोग करें

For encoding: paste your plain text into the input field and click Encode. The output shows Base64-encoded string ready to copy. For decoding: paste Base64 string and click Decode to retrieve original text. Toggle 'URL-safe mode' when encoding data that will be used in URLs, query parameters, or filenames—this replaces problematic characters. The tool automatically detects encoding errors (invalid Base64 characters) and shows warnings. Works with UTF-8 text including emojis, special characters, and multi-byte languages. For binary files or images, use the file upload option.

सामान्य उपयोग के मामले

HTTP Basic Auth

Encode 'username:password' to create Authorization header: `Basic dXNlcm5hbWU6cGFzc3dvcmQ=`.

Data URIs

Encode small SVG icons or images to embed directly in HTML/CSS without external files.

JWT Inspection

Decode JWT token parts (header and payload are Base64-encoded JSON) to inspect claims without verification.

Email Debugging

Decode Base64-encoded email attachment content to verify data.

API Testing

Encode JSON payloads for APIs that expect Base64-encoded request bodies.

सीमाएं और महत्वपूर्ण नोट्स

Base64 encoding increases data size by approximately 33% (4 characters for every 3 bytes of input)—not suitable for large file transfers. This tool is text-focused; while it handles UTF-8 well, true binary file encoding (like images or PDFs) should be done with specialized tools or programming libraries. Base64 is NOT encryption—it's merely encoding for safe text transmission. Anyone can decode it instantly. For file uploads, browsers may limit size to ~50-100MB depending on available memory. For very large datasets, use command-line tools like base64 (Unix/Linux/Mac) or certutil (Windows).

Technical Details

Edge Cases & Tricky Inputs

  • UTF-8 multi-byte characters (emoji, CJK) are encoded correctly — each byte is mapped independently.
  • URL-safe Base64 replaces + with - and / with _ to avoid URL encoding issues.
  • Padding characters (=) can be omitted in some implementations but are included by default here.

Performance & Processing

  • Encoding/decoding runs via the browser's built-in btoa()/atob() for ASCII, with a TextEncoder fallback for UTF-8.
  • Files up to 5 MB can be encoded without issues on modern browsers.

Developer Notes

  • Base64 increases data size by approximately 33% — consider this for bandwidth-sensitive applications.
  • Data URIs using Base64 are supported in all modern browsers for images, fonts, and CSS.

Known Limitations

  • Not encryption — Base64 is trivially reversible and provides zero security.
  • Very large files may cause browser memory pressure during encoding.