Base64 Encode / Decode

Encode text or files to Base64 and decode it back — UTF-8 and URL-safe.

What is Base64?

Base64 turns any sequence of bytes — text, an image, a PDF — into a string made of just 64 “safe” characters: A–Z, a–z, 0–9, + and /. Many systems were designed to carry plain text only: email bodies, JSON fields, HTML attributes, HTTP headers. Wrapping binary data in Base64 lets it pass through them without being corrupted. Every 3 bytes become 4 characters, so the encoded version is roughly a third larger than the original.

When is it useful?

Things to watch out for

FAQ

Is my data uploaded anywhere?

No. Encoding and decoding run entirely in your browser, and files are read locally with the FileReader API. Nothing leaves your device.

Can I turn Base64 back into an image or file?

Yes. Switch to Decode and paste the Base64 or a full data URI. PNG, JPEG, GIF and WebP images get a preview, and Download saves the original file with a matching extension.

What does “invalid character at position …” mean?

The input contains something that is not part of either Base64 alphabet — often a stray quote, a % from URL encoding, or text copied along with the data. The position tells you exactly where to look.

Base64 কী?

Base64 যেকোনো বাইটের ধারাকে — হোক তা টেক্সট, ছবি বা PDF — মাত্র ৬৪টি “নিরাপদ” অক্ষরে লেখা একটি স্ট্রিংয়ে রূপান্তর করে: A–Z, a–z, 0–9, + আর /। ইমেইল, JSON ফিল্ড, HTML অ্যাট্রিবিউট বা HTTP হেডারের মতো অনেক ব্যবস্থা শুধু সাধারণ টেক্সট বহনের জন্য তৈরি। বাইনারি ডেটাকে Base64-এ মুড়ে দিলে সেটি এসবের মধ্য দিয়ে নষ্ট না হয়ে পৌঁছায়। প্রতি ৩ বাইট হয়ে যায় ৪টি অক্ষর, তাই এনকোড করা ডেটা মূলের চেয়ে প্রায় এক-তৃতীয়াংশ বড় হয়।

কখন কাজে লাগে?

যেসব বিষয়ে সতর্ক থাকবেন

প্রশ্নোত্তর

আমার ডেটা কি কোথাও আপলোড হয়?

না। এনকোড ও ডিকোড সম্পূর্ণ আপনার ব্রাউজারেই হয়, আর ফাইল পড়া হয় FileReader API দিয়ে আপনার ডিভাইসেই। কিছুই বাইরে যায় না।

Base64 থেকে কি ছবি বা ফাইল ফিরিয়ে আনা যায়?

হ্যাঁ। “ডিকোড” বেছে নিয়ে Base64 বা পুরো data URI পেস্ট করুন। PNG, JPEG, GIF ও WebP ছবির প্রিভিউ দেখাবে, আর “ডাউনলোড” চাপলে সঠিক এক্সটেনশনসহ মূল ফাইলটি সেভ হবে।

“… নম্বর অবস্থানে অবৈধ অক্ষর” মানে কী?

ইনপুটে এমন কিছু আছে যা কোনো Base64 বর্ণমালার অংশ নয় — প্রায়ই একটি বাড়তি কোট, URL এনকোডিংয়ের %, বা ডেটার সাথে কপি হয়ে আসা অন্য লেখা। অবস্থান নম্বর দেখে ঠিক কোথায় সমস্যা তা খুঁজে পাবেন।

More free tools