Binary Text Converter
Convert text to binary, hex, or octal — and decode back.
ฐานตัวเลขในการคอมพิวเตอร์
ตารางการแปลงอย่างรวดเร็ว
วิธีใช้ตัวแปลงนี้
คอมพิวเตอร์จัดเก็บทุกอย่างเป็น binary (ฐาน 2) มนุษย์ใช้ decimal (ฐาน 10) สำหรับตัวเลขในชีวิตประจำวัน Hexadecimal (ฐาน 16) และ octal (ฐาน 8) ใช้เป็นอักษรย่อสะดวกสำหรับ binary — พวกมันจัดกลุ่มบิตเป็นกลุ่ม 4 บิตและ 3 บิตตามลำดับ ทำให้ตัวเลข binary ขนาดใหญ่อ่านได้ง่ายขึ้นมาก
นักศึกษาวิทยาการคอมพิวเตอร์ใช้การแปลงข้อความเป็น binary เพื่อเข้าใจวิธีจัดเก็บอักขระในหน่วยความจำ นักวิจัยความปลอดภัยวิเคราะห์การแสดง binary และ hex ของส่วนหัวไฟล์และแพ็กเก็ตเครือข่าย นักพัฒนาที่ทำงานกับโปรโตคอลระดับต่ำ (BLE, CAN bus, Modbus) ต้องการแปลงระหว่างข้อความที่มนุษย์อ่านได้กับสตริงไบต์ hex
มาตรฐาน ASCII กำหนดรหัส 7 บิต (0–127) ให้กับอักขระ 128 ตัว Extended ASCII (128–255) ครอบคลุมอักขระที่มีเครื่องหมายกำกับโดยใช้ 8 บิต Unicode ขยายสิ่งนี้อย่างมาก — กว่า 140,000 อักขระ — โดยใช้ 1 ถึง 4 ไบต์ต่ออักขระในการเข้ารหัส UTF-8
Binary เป็นภาษาดั้งเดิมของคอมพิวเตอร์แต่ยืดยาด — ไบต์เดียวต้องใช้ 8 อักขระ Hexadecimal แทนไบต์เดียวกันใน 2 อักขระ ทำให้ memory dumps, packet captures และแฮชการเข้ารหัสอ่านและเปรียบเทียบได้ง่ายขึ้นมาก Octal ถูกใช้ทางประวัติศาสตร์ใน Unix permissions (chmod 755)
- Binary 01001000 = Decimal 72 = Hex 48 = Octal 110 = 'H'
- Binary 01100101 = Decimal 101 = Hex 65 = Octal 145 = 'e'
- Binary 01001100 = Decimal 76 = Hex 4C = Octal 114 = 'L'
- Text → Binary: ป้อนข้อความใดก็ได้ รับไบต์ 8 บิตที่คั่นด้วยช่องว่าง
- Binary → Text: วาง binary bytes ที่คั่นด้วยช่องว่าง (เช่น 01001000 01101001)
- Text → Hex: แต่ละอักขระกลายเป็นรหัส hex ตัวพิมพ์ใหญ่ 2 หลัก
- Hex → Text: วาง hex bytes ที่คั่นด้วยช่องว่าง (เช่น 48 65 6C 6C 6F)
คำถามที่พบบ่อย
- How is text converted to binary?
- Each character in the text is converted to its ASCII (or Unicode) code point. That number is then written in base 2 (binary), padded to 8 bits. For example, 'H' is ASCII 72, which is 01001000 in binary. Each byte (8-bit group) represents one character.
- How do I read binary code?
- Binary uses only digits 0 and 1. Each group of 8 bits (a byte) represents one character. To decode: split binary into groups of 8 bits, convert each group from base 2 to decimal, then look up the decimal value in the ASCII table. For example, 01001000 = 72 = 'H'.
- What is hexadecimal (hex) and how is it used in computing?
- Hexadecimal (base 16) uses digits 0–9 and A–F. Each hex digit represents 4 bits, so 2 hex digits represent 1 byte. Hex is widely used in computing for colour codes (#FF5733), memory addresses (0x7fff), character encodings (U+0041 = 'A'), and cryptographic hashes. It is more compact and readable than raw binary.
- What is octal and where is it used?
- Octal (base 8) uses digits 0–7. Each octal digit represents 3 bits. Octal is historically used in Unix file permissions (chmod 755), older programming languages (C/C++ octal literals with leading 0), and embedded systems. It is less common than hex in modern programming.
- Does this converter support Unicode / emoji?
- This converter works with ASCII characters (0–127) and extended ASCII (128–255). For Unicode characters beyond the Basic Latin block (emoji, Devanagari, Chinese, etc.), the conversion uses the character's code point, which may be larger than a single byte.
เครื่องมือที่เกี่ยวข้อง
- JSON Formatter, Validator & Repair Tool
Format, minify, validate, and repair JSON instantly in your browser. Sort keys alphabetically, auto-format on paste, download as file, escape/unescape strings — free, no sign-up, 100% client-side.
- ตัวสร้าง QR Code
สร้าง QR code สำหรับ URL ข้อความ Wi-Fi และอื่นๆ ดาวน์โหลดเป็น PNG
- ตัวสร้างรหัสผ่าน
สร้างรหัสผ่านสุ่มที่แข็งแกร่งด้วยความยาวและชุดอักขระที่กำหนดเอง
- Base64 เข้ารหัส / ถอดรหัส
เข้ารหัสข้อความเป็น Base64 หรือถอดรหัสกลับเป็นข้อความธรรมดา
- URL เข้ารหัส / ถอดรหัส
เข้ารหัสหรือถอดรหัส URL และ query strings ด้วย percent-encoding