PNG OUTPUT

Convert a rendered webpage into a crisp PNG artifact

Send an authorized HTTP or HTTPS URL, define the responsive state, and receive a lossless PNG result without packaging a browser. PNG is a practical default for UI evidence, diagrams, and images that will be reviewed closely.

PNG
Lossless output
Full page
Optional document capture
Server-side
Private API key
Install:POST /api/v1/screenshot · format: png
Auth:SNAPSHOT_SITE_API_KEY
Get started for free
Webpage to PNG workflow
Snapshot Site themed webpage to PNG API illustration
Good fits
Visual QA evidence with sharp interface edges
Documentation screenshots containing diagrams or code
Baselines that will enter a visual comparison workflow
Page captures that need lossless repeated editing

Choose PNG when fidelity matters more than file size

PNG preserves exact raster values without lossy compression. That makes it useful for interface text and visual evidence, while photographic pages may produce larger files than JPEG or WebP.

1

Rendered source

The managed browser executes page JavaScript before producing the requested image.

2

Explicit dimensions

Width and height select the responsive layout; fullSize chooses viewport or scrollable document.

3

Measured readiness

Use the smallest reliable delay for fonts, lazy media, charts, and hydrated content.

4

Durable storage

Validate the response and copy the artifact into storage governed by your application.

Implementation workflow

Create a reproducible PNG capture

1

Select an authorized representative URL

2

Set format to png and choose intentional viewport dimensions

3

Configure full-page and readiness options from the visual requirement

4

Store the PNG together with its capture specification

Webpage to PNG API example

cURL

Capture a full-page PNG

This request keeps the API key in a protected shell environment and makes responsive state explicit.

curl --fail-with-body --request POST \
  --url https://api.prod.ss.snapshot-site.com/api/v1/screenshot \
  --header "Content-Type: application/json" \
  --header "x-snapshotsiteapi-key: $SNAPSHOT_SITE_API_KEY" \
  --data '{
    "url": "https://example.com/documentation",
    "format": "png",
    "width": 1440,
    "height": 900,
    "fullSize": true,
    "hideCookie": true,
    "delay": 2
  }'

PNG is a fidelity choice

A webpage-to-PNG workflow is most useful when the pixels themselves are evidence. Interface text, thin borders, diagrams, terminal output, and flat brand colors survive lossless encoding without the halos that a lossy format can introduce. That makes PNG a sensible input for visual review and approved baselines.

The tradeoff is storage and transfer size. A long page containing photography can create a heavier PNG than an equivalent JPEG or WebP. Choose the format from the artifact's job rather than applying one format across every route.

Define the rendered state

The URL is only the beginning of a reproducible request. Width determines the responsive breakpoint, height defines the viewport, and fullSize selects whether the result extends through the document. Timing and cleanup choices determine whether the page contains final data or an intermediate loader.

Test a representative static page, a client-rendered page, and a long page before standardizing configuration. Store those request fields with the output so another developer can reproduce an unexpected capture.

Validate before publishing

Treat the API response as untrusted external data until its status and expected fields are checked. Download the returned artifact into application-owned storage when the file needs stable access or retention. Do not expose private source information through a broadly public image URL.

For pixel comparisons, keep both states on the same viewport and output settings. PNG encoding does not make an unstable page deterministic; it only avoids introducing additional lossy image changes.

Use the response format guide when choosing among PNG, JPEG, WebP, PDF, and HTML, and the full-page guide for long documents.

Webpage to PNG API FAQ

What is a webpage to PNG API?

It renders a reachable web URL in a managed browser and returns a PNG image representing the requested viewport or full document.

Why choose PNG instead of JPEG?

PNG uses lossless compression, so interface edges, small text, diagrams, and flat colors remain crisp. The resulting file can be larger for photographic pages.

Can the API capture the full page?

Yes. Enable fullSize when the entire scrollable document is required, and define readiness for content that loads below the first viewport.

Does PNG guarantee identical pixels on every environment?

No. Fonts, target data, animations, responsive state, browser changes, and third-party content can affect output. Preserve the capture context and stabilize the page.

Can I request transparency?

A normal webpage capture reflects the rendered page background. The screenshot request does not turn an arbitrary page into a transparent cutout.

How should I capture lazy-loaded images?

Use an intentional readiness strategy and test below-the-fold content. Full-page mode alone does not guarantee that every lazy image has completed.

Where should the API key be used?

Only in a trusted backend, worker, protected CLI, or CI job through the x-snapshotsiteapi-key header.

How should PNG files be retained?

Store them under access, lifecycle, and deletion rules appropriate to the source page, with viewport and capture time beside the artifact.

Create one lossless page capture

Start with a controlled URL and an explicit viewport, then verify the PNG before adding it to a production workflow.