EditSafely

Convert an Image to Hex Codes

Dump every pixel of an image as a #rrggbb hex color code. Runs entirely in your browser, so your data never leaves your device.

Input

Drop a file here, or click to browse

Files never leave your device

Output

The result appears here as you type.

How to use Convert an Image to Hex Codes

  1. 1. Upload the image. Drop in a small image, since the output lists one hex code per pixel and large photos would produce an enormous amount of text.
  2. 2. Read the dumped pixel grid. The tool prints the image dimensions followed by each row of pixels as #rrggbb hex codes, arranged so the layout mirrors the original pixel grid.
  3. 3. Copy the hex output. Copy the full text of hex codes to paste into a spreadsheet, a script, or anywhere you need the exact color of every pixel represented as text.

When to use Convert an Image to Hex Codes

Convert an Image to Hex Codes dumps every pixel of a small image as a #rrggbb hex color code arranged in its original grid layout. It is for extracting exact per-pixel color data as plain text rather than viewing the image visually.

  • Feeding pixel data into code. A generative art script needs the exact hex color of each pixel in a tiny reference image to reproduce or manipulate it programmatically instead of loading image files at runtime.
  • Verifying an icon's exact colors. A designer needs to confirm the precise hex values used in a small icon before matching them in a style guide, rather than sampling colors manually with a picker tool.
  • Reconstructing pixel art from text. A tiny sprite or pixel-art image needs to be represented as plain text so it can be version-controlled, diffed or embedded directly in source code as a lookup table.

Examples

Read the pixels

Input

tiny.png

Output

# 2×1
#ff0000 #0000ff

About the Convert an Image to Hex Codes tool

Convert an Image to Hex Codes runs as plain JavaScript in your browser tab, with no server behind it. Dump every pixel of an image as a #rrggbb hex color code. Whatever you put in stays on your device from start to finish.

The tool is part of EditSafely's Image Tools section, 200 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.

There is nothing to configure. Provide the input and the result appears on its own. A worked example further down the page shows exactly what the tool produces for a real input.

That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.

Frequently asked questions

Is Convert an Image to Hex Codes free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

Which files does Convert an Image to Hex Codes accept?

It accepts images in any common format (PNG, JPG, WebP, GIF and more). There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.

Related tools

All Image Tools