Gray Code Converter
Free online Gray code converter. Convert decimal to Gray code, binary to Gray code, and back instantly. Reflected binary (unit-distance) code for digital electronics, Karnaugh maps, and rotary encoders. Handles large values with arbitrary-precision arithmetic. No signup required.
Loading tool...
What is Gray Code Converter?
A Gray Code Converter translates numbers between decimal, plain binary, and Gray (reflected binary) code. In Gray code, consecutive integers differ by exactly one bit, which prevents glitches in hardware and simplifies Karnaugh-map and encoder design.
Key Benefits
- Instant three-way conversion as you type
- Bidirectional: encode to Gray and decode back to binary/decimal
- Arbitrary-precision BigInt for huge values
- Clear validation for invalid digits
- 100% client-side β nothing is uploaded
Common Use Cases
- β’Digital-electronics students verifying Gray code tables
- β’Engineers designing rotary or angular encoders
- β’Developers working on Karnaugh maps and glitch-free logic
- β’Anyone learning reflected binary code concepts
How to Use the Gray Code Converter
- Pick an input format: Choose Decimal, Binary, or Gray as the format of the value you want to convert.
- Enter your value: Type or paste the number. The tool converts automatically as you type and validates the digits.
- Read the three outputs: The results show the equivalent Decimal, Binary, and Gray code representations side by side.
- Copy a result: Click Copy next to any output to copy it to your clipboard for use in schematics or code.
Key Features
- Three-way conversion: decimal, binary, and Gray (reflected binary) code
- Instant bidirectional decode β Gray to binary and binary to Gray
- Arbitrary-precision BigInt handles arbitrarily large values
- Real-time results with clear invalid-input validation
- One-click copy for every output format
- 100% client-side β your data never leaves the browser