Site in a PNG

Recover a working website from a pair of nearly identical prints, then try it with your own image and HyperText Markup Language (HTML) file. Site in a PNG stores bits in the red, green and blue samples of a Portable Network Graphics (PNG) image. It checks the recovered HTML for damage and lets you choose when to run it in an isolated preview.

Select Extract the example to find the small website inside the PNG.

Find the site

Both prints are 384 × 240 pixels.

Download example PNG
Print with black and red concentric arcs and a red dot on cream paper
Original
Print with black and red concentric arcs and a red dot on cream paper
With the website
What it does
  • Extract Light Switch from the example PNG and run the switch in an isolated preview.
  • Use an image your device can decode and a self-contained HTML file. See how much of the image’s capacity the complete packet needs.
  • Compare the original with the encoded PNG and see how many color values changed by one level.
  • Read the exact samples of a previously encoded PNG and check the recovered HTML with a 32-bit cyclic redundancy check (CRC-32).

How to use Site in a PNG

  1. Recover the example

    Compare the two prints and select Extract the example. When the checksum matches, open the isolated preview and press Switch on.

  2. Hide a site of your own

    Select Hide a site, then choose an image and a self-contained HTML file. The capacity meter includes the filename and the packet header. Create the encoded PNG and download it.

  3. Read a saved PNG

    Select Extract a PNG and choose a file made by this tool. Extract the website to check the recovered bytes. After the checksum matches, choose whether to open the preview or download the HTML.

Formats and limits

Inputs

  • An image your device can decode, such as PNG, JPEG or WebP.
  • One self-contained UTF-8 HTML file with any required styles and scripts included.

Outputs

  • A lossless PNG with the packet stored in the red, green and blue samples.
  • The stored filename and HTML bytes after a matching payload checksum.
  • An optional isolated preview of the source or recovered HTML.

Compatibility

  • Encoding always produces PNG. Extraction reads non-interlaced 8-bit grayscale, RGB, grayscale-alpha and RGBA PNG data.
  • PNG files generated by the original Website Inside an Image tool use the same version of the packet format.

Known limits

  • JPEG conversion, resizing, cropping, recoloring and screenshots can destroy the payload.
  • Capacity is three bits per pixel, rounded down to whole bytes, minus the 24-byte header and the UTF-8 filename. Images are limited to 32 million pixels.
  • The tool reads a single HTML file. Include the styles and scripts it needs in that file for a self-contained result.

Where your data goes

  • The tool processes your image and HTML on your device.
  • Open HTML previews only for files you trust. A page can request external resources once you open it.

Where the website lives

A versioned packet contains a signature, a byte count, a filename, the HTML and its checksum. The encoder walks the image from the first pixel and replaces the lowest bit of each red, green and blue sample in order, leaving alpha unchanged. It writes those samples as an 8-bit RGBA PNG. The extractor inflates the PNG data and reverses its scanline filters directly, then follows the same sample order to recover the packet and check the HTML. This avoids rounding the samples through a rendered image before extraction.

Questions about Site in a PNG

Do the two example images have the same pixels?

They look alike at the displayed size. The encoded PNG differs at thousands of color samples, with each changed value moving by one level.

Why export as PNG?

PNG preserves the encoded samples exactly. A lossy JPEG conversion can change the lowest bit of a color sample even when the image still looks similar.

What does a matching checksum tell me?

The checksum checks for accidental changes to the HTML bytes. Anyone who changes the HTML can also recalculate it, so open previews only for files you trust.