Gray Code to Hexadecimal Converter
Convert Gray code (reflected binary) to hexadecimal values online. Supports batch conversion.
Paste a reflected-binary value and get its hex equivalent back the same moment you stop typing. Batch mode converts a whole column of encoder readings line by line, which saves a lot of copy-paste when you're debugging a rotary sensor log. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter Gray code values in the left panel, one per line. Use only 0s and 1s.
Configure options -- toggle uppercase hex output or add the 0x prefix.
Click Convert or leave Live mode on for automatic conversion as you type.
Copy or Download the hexadecimal result using the toolbar buttons.
Frequently Asked Questions
What is Gray code?
Gray code (also called reflected binary code) is a binary numeral system where two successive values differ in only one bit. This property makes it useful in rotary encoders, error correction, and digital communications where minimizing bit errors during transitions is important.
How is Gray code converted to hexadecimal?
First, the Gray code is converted to standard binary. The most significant bit stays the same, and each subsequent bit is XORed with the previous binary bit. The resulting binary number is then converted to hexadecimal by grouping bits into sets of four from right to left.
Can I convert multiple Gray code values at once?
Yes. Enter one Gray code value per line. Each line will be independently converted to its hexadecimal equivalent. Empty lines are ignored.
What characters are valid in Gray code input?
Only the digits 0 and 1 are valid in Gray code input. Spaces are stripped automatically. Any other characters will result in an error for that line.
Is my data safe?
Yes. All conversion is performed entirely in your browser using JavaScript. No data is sent to any server.