跳转到主要内容

十六进制转换器

在浏览器中将十六进制字符串转换为文本、十进制和二进制——或将文本编码为十六进制。

Input
0 chars | 0 bytes
Output
Decimal
Binary
Octal
Hexadecimal

Hexadecimal is the lingua franca of low-level computing. Memory addresses, colour values, byte sequences in network packets, cryptographic hashes, and file magic numbers are all conventionally written in hex. Understanding what a hex string actually contains — as text, as a decimal number, or as a binary sequence — is a daily task for systems programmers, security researchers, and anyone debugging at the byte level.

This tool converts hex input to text, decimal, and binary simultaneously. Paste a hex dump from Wireshark, a colour code from a design file, a hash value from a certificate, or a raw byte sequence from a protocol specification, and immediately see what it contains in every useful representation — without writing a one-liner in Python or opening a calculator.

如何在线使用十六进制转换器

  1. 1

    粘贴十六进制字符串或文本

    粘贴十六进制字符串以将其解码为 UTF-8 文本、十进制和二进制。或输入纯文本以查看其十六进制编码的字节表示。

  2. 2

    自动去除分隔符

    工具自动去除 0x 前缀、空格和冒号,并显示提示说明输入已被清理。

  3. 3

    复制任意输出

    所有表示形式随输入同步更新。复制您需要的输出。

How Hexadecimal Representation Works

Hexadecimal is base 16, using the digits 0–9 and letters A–F (or a–f). Each hex digit represents exactly four bits (a nibble), and two hex digits represent one byte — making hex a compact, human-readable way to display binary data where every byte maps to a predictable two-character group. This alignment with byte boundaries is why hex is preferred over decimal for raw binary inspection: `0xFF` is immediately recognisable as a fully set byte, while its decimal equivalent 255 gives no immediate visual clue.

Converting hex to text interprets each pair of hex digits as a byte value and maps it through an encoding — typically ASCII or UTF-8. Converting to decimal treats the entire hex string as a big-endian integer and computes its decimal value. Converting to binary expands each hex digit to its four-bit binary equivalent.

为什么使用 FileCrank 十六进制转换器?

  • ✓ 自动去除十六进制输入中的 0x 前缀、空格和冒号。
  • ✓ 同时显示文本、十进制和二进制输出。
  • ✓ 处理 UTF-8 解码,对无效字节使用替换字符。
  • ✓ 完全在浏览器中运行——不向任何服务器发送数据。

功能与规格

最大文件大小
最大 100 MB
隐私
文件在约一小时后删除
价格
免费,无需注册
处理方式
100%客户端
您的数据永不离开浏览器——所有处理均在本地完成。无需注册账户。免费使用,无限制。

常见问题

十六进制字符串中哪些字符有效?

只有数字 0-9 和字母 A-F(不区分大小写)。空格、0x 前缀和冒号会自动去除。任何其他字符都标记为无效。

为什么解码我的十六进制字符串会产生不可读的字符?

十六进制字节表示不可打印或非 UTF-8 数据。二进制文件、加密数据和某些编码会产生无法解码为可读 UTF-8 文本的十六进制。

此工具与 bin2hex 有什么区别?

此工具对人类可读的文本字符串和数值进行操作。bin2hex 在原始字节级别操作——将二进制载荷粘贴为十六进制编码的字节并查看十六进制转储。

我可以在这里将十六进制颜色代码转换为 RGB 值吗?

不能直接转换——此工具将十六进制字符串转换为文本和十进制数。但您可以手动解释三个字节对:FF0000 = 红色 255,绿色 0,蓝色 0。

Hex Converter vs. xxd vs. Python bytes.fromhex()

The `xxd` command-line tool is excellent for hex dumping files but requires terminal access and produces a canonical dump format rather than a targeted conversion. Python's `bytes.fromhex()` and `int(..., 16)` are concise but require a REPL. A browser-based hex converter is faster for interactive inspection of a hex value pasted from documentation, a debugger, or a chat message — especially when you want multiple output formats at the same time.

FileCrank 十六进制转换器将十六进制字符串解码为 UTF-8 文本、十进制和二进制,并将文本编码为十六进制,自动去除分隔符,完全在浏览器中运行。

Advertisement

Ad