Hex String Converter — Text, Bytes, Colors, Endian

Multi-tool for hex strings: convert hex to text (UTF-8), to a byte array (Python / Go / C-style literals), to decimal, to binary; swap endianness; XOR two hex strings; chunk into n-byte groups for readability. Useful for binary protocol debugging, hash inspection, and embedded systems work.

How to use the Hex String Converter — Text, Bytes, Colors, Endian

Paste a hex string (whitespace and 0x prefixes are stripped automatically). Pick an operation. Some operations need an extra parameter: XOR needs a hex key (cycled if shorter than input), Chunk needs the group size.

Endianness swap reverses byte order — useful when reading little-endian wire data on a big-endian host or vice versa (network byte order is big-endian; x86 is little-endian).

About Hex String Converter — Text, Bytes, Colors, Endian

Hexadecimal is the universal middle layer between binary data and human-readable text. Every byte fits in two hex digits, making it the standard way to display hashes (SHA-256, MD5), network packets, memory dumps, encryption keys, and binary protocol traces. Working with hex involves a handful of common operations: turn the bytes into a higher-level interpretation (text, decimal, color), reformat for readability, or do bit-level manipulation (XOR, endian swap).

This tool gathers the operations into one place. The text conversion uses UTF-8 strict mode — invalid byte sequences raise an error rather than silently producing replacement characters, which catches encoding mismatches early. Multiple output formats (Python bytes, Go []byte, C array) make it easy to paste hex literals into source code in whatever language you’re working with.

Common use cases

  • Binary protocol debugging — inspect wire bytes, swap endianness, chunk into fields.
  • Hash analysis — see a hash in different formats / chunk sizes.
  • Embedded development — generate C / Go byte literals for firmware constants.
  • CTF challenges — XOR a ciphertext with a candidate key, see if plaintext emerges.

Frequently asked questions

What's the XOR key format?

Hex (same as the input). If the key is shorter than the input, it cycles. Common for repeating-key XOR challenges in CTFs.

How does the C array look?

uint8_t bytes[] = {0x48, 0x65, ...}; \xE2\x80\x94 ready to paste into a .c / .h file.

Why is decimal sometimes too big for JavaScript?

JavaScript numbers are 64-bit floats with 53 bits of integer precision. Hex strings longer than 13-14 digits exceed safe integer range; the tool uses BigInt for those, so the decimal is exact but you'll see a trailing n in some contexts.