RGB565 image converter
Files are processed locally in your browser. No image data is uploaded to the server.
Convert PNG, JPG, and WebP images to RGB565 arrays for TFT LCD and embedded display projects. Generate C/C++ output with endian and format options directly in your browser.
Files are processed locally in your browser. No image data is uploaded to the server.
RGB565 stores each pixel in 16 bits: 5 bits red, 6 bits green, and 5 bits blue. It is commonly used by embedded displays and TFT LCD modules because it reduces memory and bus bandwidth compared with 24-bit RGB.
The practical conversion is r5 = r >> 3, g6 = g >> 2, b5 = b >> 3, then rgb565 = (r5 << 11) | (g6 << 5) | b5. This tool applies the same conversion in browser-side JavaScript.
Use 16-bit words when your graphics API accepts uint16_t color values. Use byte arrays when your display driver expects explicit byte order on SPI writes. Header and PROGMEM options help firmware integration.
Some display drivers send high-byte first, while others send low-byte first. Select the byte order that matches your display controller and library behavior.
| Color | RGB888 | RGB565 | Big-endian bytes | Little-endian bytes |
|---|---|---|---|---|
| Black | #000000 | 0x0000 | 0x00, 0x00 | 0x00, 0x00 |
| White | #FFFFFF | 0xFFFF | 0xFF, 0xFF | 0xFF, 0xFF |
| Red | #FF0000 | 0xF800 | 0xF8, 0x00 | 0x00, 0xF8 |
| Green | #00FF00 | 0x07E0 | 0x07, 0xE0 | 0xE0, 0x07 |
| Blue | #0000FF | 0x001F | 0x00, 0x1F | 0x1F, 0x00 |
| Yellow | #FFFF00 | 0xFFE0 | 0xFF, 0xE0 | 0xE0, 0xFF |
Small displays such as 128x160 or 240x240 can use static image assets directly. Larger sizes like 320x240 and above increase flash size quickly, so consider compression or partial rendering.
An RGB565 C array is a sequence of 16-bit pixel values, usually stored as uint16_t or uint8_t bytes, used by embedded display drivers.
Load the image in the tool, choose output size and format, then generate the array. The tool converts RGB888 pixels to RGB565 in your browser.
Use the byte order required by your display controller and driver. If colors look swapped, try the other byte order.
No. Image processing runs locally in your browser, and files are not uploaded by this tool.
RGB565 has fewer color levels than RGB888, so gradients and subtle colors may show quantization differences.