Text ↔ Binary / Hex / Octal Converter
Visualize text as colored bit patterns, toggle individual bits, and perform byte-level AND/OR/XOR/NOT operations.
이 도구에 대해
A deep-dive text encoding tool focused on visual bit-level understanding. Each character is displayed as a color-coded 8-bit pattern so you can see exactly how text is stored in memory. Click any individual bit to toggle it and see which character results from the change. The bit calculator lets you perform AND, OR, XOR, and NOT operations on two bytes and see the result character. Supports ASCII and UTF-8. Displays parallel hex and octal representations. Perfect for learning about character encoding, bit manipulation, and binary arithmetic.
사용 방법
- 1 Type or paste text into the input box.
- 2 Each character appears as a labeled 8-bit grid with binary, hex, and octal values.
- 3 Click any individual bit square to toggle it; the character display updates immediately.
- 4 Scroll down to the Bit Calculator, enter two bytes, select an operation, and click Calculate.
- 5 Use the mode buttons to switch the main display between ASCII, UTF-8, and custom delimiter outputs.
How text becomes ones and zeros
A computer stores no letters — only numbers. Text becomes binary in two steps. First, a character encoding assigns each character a number: in ASCII the capital H is 72, lowercase i is 105. Second, that number is written in base 2, padded to a fixed width — usually 8 bits, one byte. So H (72) becomes 01001000 and i (105) becomes 01101001. This visualizer lays each character out as a labeled byte, color-codes the eight bit positions, and lets you flip any single bit with a click to watch the character change in real time.
ASCII vs. UTF-8 — why the choice matters
The encoding dropdown is not cosmetic. ASCII covers only the first 128 characters (English letters, digits, basic punctuation) and forces every character into a single 7-bit value. UTF-8 is the modern web standard and handles every character on Earth. Plain English is identical in both, but anything beyond ASCII diverges sharply. The tool encodes UTF-8 with the browser's real TextEncoder, so the bytes you see are exactly what a file or network packet would contain.
Concretely, the character é is one byte in some legacy encodings but two bytes in UTF-8 (11000011 10101001), and an emoji like a smiley is four bytes. That is why a tweet's character count and its byte count differ, and why "this string is 10 characters" does not mean "10 bytes." Switching the dropdown to ASCII for a non-English character will mangle it, because the value no longer fits in 7 bits — a useful demonstration of exactly why UTF-8 exists.
A worked example: encoding "Hi"
| Char | Decimal | Binary (8-bit) | Hex | Octal |
|---|---|---|---|---|
| H | 72 | 01001000 | 0x48 | 110 |
| i | 105 | 01101001 | 0x69 | 151 |
The tool shows all of these per character, and you can toggle the hex, octal, and decimal rows on or off. Reverse the process in Bits → Text: paste space-separated bytes in binary, hex, octal, or decimal and it decodes them back to text through the browser's TextDecoder, correctly reassembling multi-byte UTF-8 sequences.
The bit calculator and why bitwise operations matter
The third mode is a one-byte bitwise calculator. Enter two bytes (as binary, hex like 0x48, or decimal) and apply AND, OR, XOR, NOT, or a one-position shift, then read the result in binary, decimal, hex, and as a character. These operations are the bedrock of low-level programming:
- AND keeps a bit only if it is 1 in both operands — used to mask out bits, e.g.
value & 0x0Fkeeps the low nibble. - OR sets a bit if it is 1 in either operand — used to turn flags on.
- XOR flips bits that differ; XORing a value with itself gives zero, which underlies simple toggles and checksums.
- Left shift by one multiplies by 2 (within the byte); right shift divides by 2 and drops the remainder. Results are masked to 8 bits, so shifting can roll a bit off the end.
For example, 72 AND 48 is 01001000 AND 00110000 = 00000000 — no bit is set in both, so the answer is 0. Change the operation to XOR and you get 01111000 (120), the character x.
Common mistakes
- Forgetting leading zeros. A byte is always 8 bits.
1001000(7 bits) is not a valid byte; pad it to01001000. - Mixing up bit order. The leftmost bit is the most significant (worth 128), the rightmost the least (worth 1). Reading them backwards gives a completely different number.
- Assuming one character equals one byte. True only for ASCII-range text; accented letters, CJK characters, and emoji span multiple bytes in UTF-8.
- Decoding partial UTF-8. If you paste only some of the bytes of a multi-byte character into Bits → Text, the result will be a replacement symbol because the sequence is incomplete.
Privacy
All encoding, decoding, and bit math happen locally in your browser via the standard TextEncoder and TextDecoder APIs. Whatever text you paste — including anything private — never leaves your device.
자주 묻는 질문
일반 텍스트를 이진수, 16진수, 8진수 또는 10진수로 변환하고 반대로도 변환합니다 — 문자별 분류 포함.
Convert numbers between any bases 2–36 with arbitrary precision, negatives, and floating point support.
텍스트 또는 파일에서 SHA-1, SHA-256, SHA-384, SHA-512 해시를 생성하세요 — 브라우저에서 오프라인으로 실행됩니다.