Skip to content
shellhacks.dev
Docker

Docker Image Reference Parser

Parse a Docker image reference into registry, repository, tag and digest, see the implied defaults, and get the fully qualified name to pin.

Free · No sign-up · Your inputs stay in your browser

Input

Parse a Docker image reference

Output

Parts

Registryghcr.io
Repositoryacme/api
Tag1.4.2
Digestsha256:9b2a3f6e1c0d4b8a7e5f3c2d1b0a9e8f7c6d5b4a3e2f1d0c9b8a7e6f5d4c3b2a
Fully qualifiedghcr.io/acme/api:1.4.2@sha256:9b2a3f6e1c0d4b8a7e5f3c2d1b0a9e8f7c6d5b4a3e2f1d0c9b8a7e6f5d4c3b2a
Pull by digestdocker pull ghcr.io/acme/api@sha256:9b2a3f6e1c0d4b8a7e5f3c2d1b0a9e8f7c6d5b4a3e2f1d0c9b8a7e6f5d4c3b2a

When both are given, the digest wins and the tag is ignored.

A first component with a dot or a port, or the word localhost, is a registry host; otherwise the image comes from Docker Hub, and a single-name image lives under library/. That is why nginx and docker.io/library/nginx:latest are the same image.

Runs in this browser. Nothing you paste is sent to a server.

Tags move, digests do not

A tag such as 1.4.2 or latest is a pointer the publisher can move; a digest (@sha256:...) names one specific image. Deploying by digest guarantees every node runs the same bits. docker buildx imagetools inspect image:tag shows the digest a tag currently points to, and the distribution/reference package documents the grammar.

Rules that trip people up

Repository names must be lowercase; tags allow letters, digits, underscores, dots and dashes up to 128 characters. When a reference has both a tag and a digest, the digest wins and the tag is ignored.

Share

Frequently asked questions

What registry does nginx come from?
Docker Hub: nginx expands to docker.io/library/nginx:latest. The library namespace holds Docker Official Images.
How do I pin an image by digest in Compose or Kubernetes?
Write image: nginx@sha256:<digest>, or nginx:1.27@sha256:<digest> to keep the tag readable; the digest decides what is pulled.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Keep planning

Similar tools