
Byte Array to String Converter
Convert hex, decimal, or binary byte arrays to UTF-8 strings with strict validation, or encode text into hex, decimal, and JSON byte arrays.
Open toolConvert between 7-bit I2C peripheral addresses (unshifted) and 8-bit I2C read/write wire bytes (shifted left by 1 bit) in hexadecimal, decimal, and binary.
Enter the inputs, then select Calculate.
Result will appear here
Vendor datasheets and microcontroller HAL libraries often disagree on whether an I2C address includes the Read/Write (R/W) direction bit in bit 0. This converter shows all three forms side by side.
Given a 7-bit address A7 (0x00 to 0x7F): 8-bit Write Byte = (A7 << 1) | 0, and 8-bit Read Byte = (A7 << 1) | 1. Conversely, given an 8-bit wire byte B8: 7-bit Address = B8 >> 1.
An 8-bit write byte is always an even number (LSB = 0), and an 8-bit read byte is always an odd number (LSB = 1). 7-bit addresses 0x00 to 0x07 and 0x78 to 0x7F are flagged as I2C specification reserved ranges.
Standard 7-bit addresses (used by Arduino Wire and Linux i2cdetect) vs 8-bit Write/Read bytes (often used by STM32 HAL and logic analyzers).
| Common Device | 7-Bit Address (Hex / Dec) | 8-Bit Write Byte (LSB=0) | 8-Bit Read Byte (LSB=1) | 7-Bit Binary |
|---|---|---|---|---|
| SSD1306 OLED Display | 0x3C (60) | 0x78 (120) | 0x79 (121) | 0111100 |
| PCF8574 / LCD Backpack | 0x27 (39) | 0x4E (78) | 0x4F (79) | 0100111 |
| 24LCxx I2C EEPROM (A0-A2=0) | 0x50 (80) | 0xA0 (160) | 0xA1 (161) | 1010000 |
| MPU-6050 / DS1307 /DS3231 RTC | 0x68 (104) | 0xD0 (208) | 0xD1 (209) | 1101000 |
| BME280 / BMP280 Sensor (SDO=0) | 0x76 (118) | 0xEC (236) | 0xED (237) | 1110110 |
| BME280 / BMP280 Sensor (SDO=1) | 0x77 (119) | 0xEE (238) | 0xEF (239) | 1110111 |
Select the format stated in your datasheet and enter the hex or decimal byte.
Choose 7-bit address if your value is between 0x00 and 0x7F without the R/W bit, or choose 8-bit write byte / 8-bit read byte if your datasheet gives an even/odd pair like 0xA0/0xA1.
Type the address in hexadecimal with a 0x prefix (such as 0x50 or 0xA0) or in base-10 decimal (such as 80 or 160).
Select Calculate result to get the unshifted 7-bit address, both 8-bit shifted bytes, binary bit patterns, and reserved-range status.
Fix NACK errors caused by bit-shift mismatches between datasheets and firmware SDKs.
Many EEPROM datasheets list 0xA0 for write and 0xA1 for read. Entering 0xA0 as an 8-bit write byte reveals the 7-bit address 0x50 required by Wire.beginTransmission(0x50).
STM32 HAL functions like HAL_I2C_Master_Transmit expect the 7-bit address shifted left by 1 bit (0x68 << 1 = 0xD0). Entering 0x68 as a 7-bit address gives 0xD0 (write) and 0xD1 (read).
7-bit addresses 0x00 to 0x07 (general call, CBUS, high-speed master code) and 0x78 to 0x7F (10-bit addressing prefix and device ID) are flagged automatically so you avoid bus collisions.
Match the converted output to your microcontroller framework or bus analyzer.
Use the 7-bit address (0x08 to 0x77 for standard peripherals) in Arduino Wire, Raspberry Pi Linux i2cdetect / smbus, ESP-IDF, and Zephyr RTOS, because those drivers shift the address and append the R/W bit automatically.
Use the 8-bit write byte (and 8-bit read byte) in STM32Cube HAL calls or when configuring raw register-level I2C address match filters.
Check why an 8-bit read or write byte might be rejected.
A valid 7-bit address must be between 0 (0x00) and 127 (0x7F). If you enter a value above 0x7F (such as 0xA0) while 7-bit address mode is selected, switch the dropdown to 8-bit write byte.
In 8-bit write mode the input must be an even integer (bit 0 = 0, range 0x00 to 0xFE), and in 8-bit read mode the input must be an odd integer (bit 0 = 1, range 0x01 to 0xFF).

Convert hex, decimal, or binary byte arrays to UTF-8 strings with strict validation, or encode text into hex, decimal, and JSON byte arrays.
Open toolEncode UTF-8 text or hex bytes as RFC 4648 Base32, or decode canonical Base32 into hex, text and a byte file.
Open tool
Convert UTF-8 strings to and from RFC 4648 Base64URL format (- and _ alphabet) with optional '=' padding control in your browser.
Open toolChoose another tool for your next calculation, conversion, or text task.

Split large .ics iCalendar files into smaller RFC 5545 .ics chunks by event count or year/month while preserving VTIMEZONE blocks for Google Calendar and Outlook.
Open tool
Build ImageMagick v7 magick and v6 convert/mogrify CLI commands with exact geometry flags, aspect-fill cropping, WebP/AVIF quality, EXIF stripping, and batch loops.
Open tool
Group binary digits into eight-bit bytes and decode them as strict UTF-8.
Open tool
Convert an HTML fragment to JSX with React attribute names, style objects and self-closing elements.
Open toolAnswers about using I2C Address Converter and understanding its results.
When a datasheet gives an even/odd pair like 0xA0 (write) and 0xA1 (read), it is showing the 8-bit wire byte that includes the R/W bit in bit 0. Shifting right by 1 bit (0xA0 >> 1) gives the single 7-bit address 0x50.
0x78 is the 8-bit write byte (0111 1000 in binary). When you shift 0x78 right by 1 bit to drop the R/W bit, you get 0x3C (011 1100), which is the 7-bit address reported by i2cdetect and Arduino scanners.
The NXP I2C specification reserves 0x00 to 0x07 (including General Call 0x00, START byte 0x01, and High-Speed Master codes 0x04-0x07) and 0x78 to 0x7F (10-bit slave addressing and Device ID). Usable unreserved 7-bit addresses span 0x08 to 0x77.
This tool converts standard 7-bit slave addresses and their corresponding 8-bit read/write wire bytes. 10-bit I2C devices use a two-byte header starting with the reserved 7-bit prefix 0x78-0x7B.
Choose another tool for your next calculation, conversion, or text task.