Image to C array

Convert an image to an embedded C byte array — 8-bit grayscale or 1-bit-per-pixel bitmap.

The image stays in this browser. Nothing is uploaded or stored.

PNG, JPG, or WebP up to 25 MiB, downscaled to at most 512px on the long edge before conversion. 1bpp rows are MSB-first, padded to whole bytes.

How to use

  1. Choose an image.
  2. Pick 8bpp or 1bpp and set the array name.
  3. Copy or download the .h output.

What it supports

PNG/JPG/WebP up to 25 MiB, downscaled to at most 512 px on the long edge before conversion. 1bpp rows are row-major, MSB-first, padded to whole bytes; threshold and invert are configurable.

Related tools

Related guides