DevToolBoxฟรี
บล็อก

ตัวเข้ารหัส / ถอดรหัส Base64

เข้ารหัสข้อความเป็น Base64 หรือถอดรหัสสตริง Base64 กลับเป็นข้อความธรรมดา รองรับ UTF-8 ฟรี ไม่ต้องสมัครสมาชิก

เกี่ยวกับการเข้ารหัส Base64

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used for encoding data in URLs, emails, HTML, and APIs. You can also decode Base64 from the command line using openssl base64 decode: run 'echo <encoded> | openssl base64 -d'. This online Base64 encoder and decoder supports full UTF-8, handles Base64 padding (the trailing = characters), and works entirely in your browser. Whether you need to base64 encode a file, decode an API response, or convert data for URL-safe transport, this tool handles it instantly.

คำถามที่พบบ่อย

𝕏 Twitterin LinkedIn

💬 User Feedback

Have suggestions or found a bug? Leave a message and we'll get back to you.
0/2000

ให้คะแนนเครื่องมือนี้

3.7 / 5 · 174 คะแนน

อัปเดตข่าวสาร

รับเคล็ดลับการพัฒนาและเครื่องมือใหม่ทุกสัปดาห์

ไม่มีสแปม ยกเลิกได้ตลอดเวลา

Enjoy these free tools?

Buy Me a Coffee

วิธีใช้งาน

  1. Enter your plain text in the top field to encode, or Base64 string in the bottom field to decode
  2. Click 'Encode' to convert text to Base64, or 'Decode' to convert Base64 back to text
  3. Copy the result with the copy button

กรณีการใช้งาน

  • Encoding images for embedding in HTML/CSS
  • Encoding data for URL parameters
  • Transmitting binary data in JSON APIs
  • Email attachment encoding

คำถามที่พบบ่อย

What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It's commonly used to transmit data safely over text-based protocols like HTTP and email.
Is Base64 encoding the same as encryption?
No. Base64 is an encoding scheme, not encryption. Anyone can decode Base64 data. It's meant for data transport, not security.
Does this tool support UTF-8?
Yes. This tool fully supports UTF-8 encoding and decoding, allowing you to work with international characters and emojis.
How do I use openssl to base64 decode on the command line?
Run 'echo <base64string> | openssl base64 -d' to decode. To encode, use 'echo -n "text" | openssl base64'. The openssl base64 command is available on macOS and Linux by default.
What is the difference between Base64 and Base64URL?
Standard Base64 uses + and / as special characters, while Base64URL replaces them with - and _ to be safe in URLs and filenames. Base64URL also omits padding (=) characters.
What is Base64 padding and why are there = signs?
Base64 encodes 3 bytes into 4 characters. When the input length isn't a multiple of 3, padding characters (=) are added to make the output length a multiple of 4. One = means 2 bytes were encoded in the last group, == means 1 byte.
Can I Base64 encode a file?
Yes. On the command line use 'base64 < file.bin > file.b64' or 'openssl base64 -in file.bin'. For images, use our Image Base64 Converter tool which supports drag-and-drop file encoding.
Is it safe to use Base64 in URLs?
Standard Base64 is not URL-safe because + and / have special meanings in URLs. Use Base64URL encoding instead, which replaces + with - and / with _ . Most programming languages have built-in Base64URL functions.