Number Base Converter
Binary, Hex & More
Convert integers between binary, octal, decimal, and hex with live 0b/0o/0x prefixes. Integer-only; stays within JavaScript safe integers.
This conversion runs only in your browser — nothing is uploaded.
- OptionsDecimal
Decimal
Hex (0x)
Octal (0o)
Binary (0b)
What is this tool?
This number base converter translates integers between base 10, 16, 8, and 2. Decimal is for human quantities; hexadecimal for bytes and memory; octal for Unix-style permissions; binary for flags and bit masks.
Choose the input base, type or paste a value (optional 0x / 0o / 0b prefixes are accepted), and read all four representations live. Outputs keep language-style prefixes so you can paste them into code comments or quick checks.
It is not a floating-point converter, IEEE 754 inspector, or arbitrary-precision BigInt calculator.
Common use cases
- Check an 8-bit byte or color channel (
255↔0xff↔0b11111111) - Expand Unix permission octals such as
755into decimal and bit patterns - Translate small masks and protocol constants between human and machine notation
How to use
- Select the base of your input: decimal, hex, octal, or binary.
- Enter an integer. Leading
+/-and common prefixes are accepted; invalid digits for the base show an error immediately. - Copy one row or Copy all four representations from the toolbar.
- Use Sample for
255(full byte), then Clear when finished.
Examples
| Input / setting | Output | Notes |
|---|---|---|
255 decimal | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | Full 8-bit byte. |
0b1010 binary | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | Small bit-mask style value. |
755 octal | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | Common Unix permission notation. |
-10 decimal | decimal -10; hex -0xa; octal -0o12; binary -0b1010 | Signed magnitude with prefixed outputs (not two’s complement). |
Practical pitfalls
- Safe-integer ceiling: Values outside
Number.MAX_SAFE_INTEGER(±9007199254740991) are rejected. Pasting a 64-bit or BigInt literal here can look “almost right” in other tools that silently lose low bits—this page fails closed instead. - Sign ≠ two’s complement width: A leading
-prints signed prefixed forms (-0xff). It does not expand to a fixed-width two’s-complement bit string (for example 8-bit0b11110110for −10). - Digits must match the selected base (
2is invalid in binary). Fractions such as1.5are out of scope.
References
이 도구는 무엇인가요?
정수를 10·16·8·2진수 사이에서 변환합니다. 십진은 사람이 읽는 값, 십육진은 바이트·메모리, 팔진은 Unix 권한, 이진은 플래그·마스크에 자주 쓰입니다.
입력 진법을 고르고 값을 넣으면(선택적 0x/0o/0b 접두사 허용) 네 표현이 바로 갱신됩니다. 소수·IEEE 754·임의 정밀 BigInt 계산기는 아닙니다.
자주 쓰는 경우
- 8비트 바이트·컬러 채널 확인 (
255↔0xff) - Unix 권한 팔진수
755를 십진·비트로 펼치기 - 프로토콜 상수·작은 마스크를 사람/기계 표기 사이에서 맞추기
사용 방법
- 입력 진법(십진·16진·8진·2진)을 선택합니다.
- 정수를 입력합니다.
+/-와 흔한 접두사를 허용하며, 진법에 맞지 않는 자리는 즉시 오류입니다. - 행별 복사 또는 툴바의 전체 복사를 사용합니다.
- Sample은
255(풀 바이트), 끝나면 Clear.
예시
| 입력 / 설정 | 출력 | 비고 |
|---|---|---|
255 십진 | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | 8비트 풀 바이트 |
0b1010 이진 | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | 작은 마스크 |
755 팔진 | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | Unix 권한 |
-10 십진 | decimal -10; hex -0xa; … | 부호 있는 접두사 표기(2의 보수 아님) |
실무에서 흔한 실수
- 안전 정수 한도:
Number.MAX_SAFE_INTEGER를 넘는 값은 거절합니다. 다른 도구가 하위 비트를 조용히 버리는 것과 달리, 여기서는 오류로 막습니다. - 부호 ≠ 고정 폭 2의 보수:
-0xff형태일 뿐, 8비트0b11110110같은 비트열로 펼치지 않습니다. - 선택한 진법에 없는 숫자·소수(
1.5)는 범위 밖입니다.
참고자료
このツールについて
整数を 10・16・8・2 進のあいだで変換します。10 進は人間向けの量、16 進はバイトやメモリ、8 進は Unix 権限、2 進はフラグやマスクでよく使います。
入力進数を選び値を入れると(任意の 0x / 0o / 0b 可)4 表現がライブ更新されます。小数・IEEE 754・任意精度 BigInt 電卓ではありません。
よくある用途
- 8 ビットバイトやカラーチャネルの確認(
255↔0xff) - Unix 権限の 8 進
755を 10 進・ビットへ展開 - プロトコル定数や小さなマスクの表記合わせ
使い方
- 入力の進数(10 / 16 / 8 / 2)を選びます。
- 整数を入力します。先頭の
+/-と一般的な接頭辞を受け付け、不正桁はすぐエラーになります。 - 行コピー、またはツールバーの一括コピーを使います。
- Sample は
255(フルバイト)。終わったら Clear。
例
| 入力 / 設定 | 出力 | メモ |
|---|---|---|
255 10進 | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | 8 ビットフル |
0b1010 2進 | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | 小さなマスク |
755 8進 | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | Unix 権限 |
-10 10進 | decimal -10; hex -0xa; … | 符号付き接頭辞(2 の補数ではない) |
実務での落とし穴
- 安全な整数の上限:
Number.MAX_SAFE_INTEGERを超える値は拒否します。他ツールが下位ビットを黙って落とすのと違い、ここでは失敗させます。 - 符号 ≠ 固定幅 2 の補数:
-0xff形式であり、8 ビット0b11110110のようなビット列にはしません。 - 選んだ進数に無い桁や小数(
1.5)は対象外です。
参考資料
¿Qué es esta herramienta?
Convierte enteros entre bases 10, 16, 8 y 2. El decimal sirve para cantidades humanas; el hexadecimal para bytes y memoria; el octal para permisos tipo Unix; el binario para flags y máscaras.
Elige la base de entrada, escribe o pega un valor (se aceptan prefijos 0x / 0o / 0b) y lee las cuatro representaciones en vivo. No es un convertidor de punto flotante, inspector IEEE 754 ni calculadora BigInt de precisión arbitraria.
Casos de uso comunes
- Comprobar un byte de 8 bits o canal de color (
255↔0xff) - Expandir permisos Unix octales como
755a decimal y bits - Traducir máscaras y constantes de protocolo entre notación humana y de máquina
Cómo usar
- Selecciona la base de la entrada: decimal, hex, octal o binario.
- Introduce un entero. Se aceptan
+/-y prefijos habituales; dígitos inválidos muestran error al instante. - Copia una fila o las cuatro representaciones desde la barra.
- Usa Sample con
255(byte completo) y Clear al terminar.
Ejemplos
| Entrada / configuración | Salida | Notas |
|---|---|---|
255 decimal | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | Byte de 8 bits. |
0b1010 binario | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | Máscara pequeña. |
755 octal | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | Permiso Unix habitual. |
-10 decimal | decimal -10; hex -0xa; … | Forma con signo (no complemento a dos). |
Errores prácticos
- Techo de enteros seguros: Fuera de
Number.MAX_SAFE_INTEGERse rechaza. Otras herramientas pueden perder bits bajos en silencio; aquí se falla de forma explícita. - Signo ≠ complemento a dos de ancho fijo:
-0xffno se expande a una cadena de bits de 8 bits. - Los dígitos deben coincidir con la base; las fracciones (
1.5) quedan fuera de alcance.
Referencias
Qu'est-ce que cet outil ?
Convertit des entiers entre les bases 10, 16, 8 et 2. Le décimal pour les quantités humaines ; l’hexadécimal pour les octets et la mémoire ; l’octal pour les permissions Unix ; le binaire pour les flags et masques.
Choisissez la base d’entrée, saisissez une valeur (préfixes 0x / 0o / 0b acceptés) et lisez les quatre représentations en direct. Ce n’est ni un convertisseur flottant, ni un inspecteur IEEE 754, ni une calculatrice BigInt.
Cas d'usage courants
- Vérifier un octet 8 bits ou un canal couleur (
255↔0xff) - Développer des permissions Unix octales comme
755en décimal et bits - Traduire masques et constantes de protocole entre notations humaine et machine
Comment utiliser
- Sélectionnez la base d’entrée : décimal, hex, octal ou binaire.
- Entrez un entier.
+/-et préfixes courants sont acceptés ; chiffres invalides → erreur immédiate. - Copiez une ligne ou les quatre représentations via la barre d’outils.
- Sample charge
255(octet plein) ; Clear pour vider.
Exemples
| Entrée / réglage | Sortie | Notes |
|---|---|---|
255 décimal | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | Octet 8 bits. |
0b1010 binaire | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | Petit masque. |
755 octal | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | Permission Unix. |
-10 décimal | decimal -10; hex -0xa; … | Forme signée (pas complément à deux). |
Pièges courants
- Plafond des entiers sûrs : Au-delà de
Number.MAX_SAFE_INTEGER, refus. D’autres outils peuvent perdre des bits bas sans bruit ; ici l’échec est explicite. - Signe ≠ complément à deux à largeur fixe :
-0xffn’est pas une chaîne de bits 8 bits. - Les chiffres doivent matcher la base ; les fractions (
1.5) sont hors périmètre.
Références
这个工具是什么?
在 整数 的 10、16、8、2 进制之间转换。十进制面向人类可读量;十六进制常用于字节与内存;八进制用于 Unix 权限;二进制用于标志与掩码。
选择输入进制,输入或粘贴数值(可带 0x/0o/0b),即可实时看到四种表示。不是浮点转换、IEEE 754 检查器,也不是任意精度 BigInt 计算器。
常见用途
- 核对 8 位字节或颜色通道(
255↔0xff) - 把 Unix 权限八进制
755展开为十进制与位模式 - 在人读与机器记号之间翻译小掩码与协议常量
如何使用
- 选择输入进制:十进制、十六进制、八进制或二进制。
- 输入整数。接受前导
+/-与常见前缀;非法数字会立即报错。 - 按行复制,或用工具栏复制全部四种表示。
- Sample 载入
255(满字节);用完后 Clear。
示例
| 输入 / 设置 | 输出 | 说明 |
|---|---|---|
255 十进制 | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | 完整 8 位字节 |
0b1010 二进制 | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | 小掩码 |
755 八进制 | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | 常见 Unix 权限 |
-10 十进制 | decimal -10; hex -0xa; … | 带符号前缀(非二补数) |
实践中的常见误区
- 安全整数上限: 超出
Number.MAX_SAFE_INTEGER会被拒绝。别的工具可能静默丢掉低位;这里选择明确失败。 - 符号 ≠ 固定宽度二补数:
-0xff不会展开成 8 位0b11110110这类位串。 - 数字必须符合所选进制;小数(
1.5)不在范围内。
参考资料
這個工具是什麼?
在 整數 的 10、16、8、2 進位之間轉換。十進位面向人類可讀量;十六進位常用於位元組與記憶體;八進位用於 Unix 權限;二進位用於旗標與遮罩。
選擇輸入進位,輸入或貼上數值(可帶 0x/0o/0b),即可即時看到四種表示。不是浮點轉換、IEEE 754 檢查器,也不是任意精度 BigInt 計算器。
常見用途
- 核對 8 位元位元組或色彩通道(
255↔0xff) - 把 Unix 權限八進位
755展開為十進位與位元模式 - 在人讀與機器記號之間翻譯小遮罩與協定常數
如何使用
- 選擇輸入進位:十進位、十六進位、八進位或二進位。
- 輸入整數。接受前導
+/-與常見前綴;非法數字會立即報錯。 - 按列複製,或用工具列複製全部四種表示。
- Sample 載入
255(滿位元組);用完後 Clear。
範例
| 輸入 / 設定 | 輸出 | 說明 |
|---|---|---|
255 十進位 | decimal 255; hex 0xff; octal 0o377; binary 0b11111111 | 完整 8 位元位元組 |
0b1010 二進位 | decimal 10; hex 0xa; octal 0o12; binary 0b1010 | 小遮罩 |
755 八進位 | decimal 493; hex 0x1ed; octal 0o755; binary 0b111101101 | 常見 Unix 權限 |
-10 十進位 | decimal -10; hex -0xa; … | 帶符號前綴(非二補數) |
實務上常見陷阱
- 安全整數上限: 超出
Number.MAX_SAFE_INTEGER會被拒絕。別的工具可能靜默丟掉低位;這裡選擇明確失敗。 - 符號 ≠ 固定寬度二補數:
-0xff不會展開成 8 位元0b11110110這類位串。 - 數字必須符合所選進位;小數(
1.5)不在範圍內。
參考資料
Last reviewed: 2026-07-27
Frequently asked questions
- Which bases are supported?
- Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Outputs use familiar `0b`, `0o`, and `0x` prefixes.
- Can I paste 0x, 0o, or 0b prefixes?
- Yes. Those prefixes are stripped before parsing. Still select the matching input base so digit validation matches the alphabet you expect.
- Why does a large integer fail?
- This tool uses JavaScript Number safe integers only (about ±9×10¹⁵ / Number.MAX_SAFE_INTEGER). Bigger values need BigInt tooling or a language runtime—precision would otherwise silently corrupt.
- Does conversion run locally?
- Yes. Parsing and conversion happen in your browser; nothing is uploaded.