EIT easy-image-tools / Build an image from hex pixel values

Build an image from hex pixel values

Assembles an image from rrggbbaa hex values (space separated). Set the width — the height is computed automatically.

Nothing found — try another word.

01

Build an image from hex pixel values

Nothing found — try another word.

Width

Nothing found — try another word.

Preview
Source
Result
no result yet

Build an image from hex pixel values assembles a picture from rrggbbaa tokens — every pixel written as eight hexadecimal characters, two each for red, green, blue and alpha. Paste them into the text field, set Width to the number of pixels in a row, and the height is worked out from the total; a 64 by 64 sprite is 4096 tokens at a width of 64. The format is strict on purpose: each token must be exactly eight hex characters and whitespace is the only separator. It is also the form a canvas script or a shader snippet already uses, where a color constant is written as 0xrrggbbaa.

  • Assembled entirely in your browser: no upload, no server, no signup.
  • Every token is exactly eight hex characters, rrggbbaa; shorthand is rejected.
  • Only the width is typed — the height follows from the token count.
  • A wrong width shears the picture row by row, the fastest way to spot it.
  • Free with no daily limit, no watermark and no account, also for commercial use.

How to use it

  1. Paste the rrggbbaa tokens into the text field; spaces and line breaks between them are fine.
  2. Set Width to the pixel count of one row - the height follows from the token count.
  3. Check the preview: a wrong width shifts every row and the picture shears, which is the fastest way to spot a bad width.
  4. Download the assembled PNG from the Download button.

Questions

Why does every token need eight characters?

The alpha byte is part of the value, so six digits are not enough. Shorthand such as #fff or #ff000080 is rejected; expand it to eight.

Does the height have to be typed too?

No, only the width. The height is the token count divided by it, and a remainder stops the page with an error instead of dropping pixels.

What about uppercase values or a leading hash?

Case does not matter - uppercase and lowercase both parse. A hash character does not: it is not a separator here, so remove it.

Can I get this format out of an image?

Yes. The PNG to HEX pixels tool lists every pixel as rrggbbaa in exactly this layout, one image row per line, an exact round trip for sprites.

Related tools