Parse container image

Split a Docker or OCI image reference into registry, namespace, name, tag, and digest.

freeworks offlinenothing uploaded
ToolContainer Image Parser
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The reference is split into optional registry, namespace path, image name, tag, and @digest. A first component containing a dot, colon, or localhost is treated as a registry; otherwise an unnamespaced image defaults to docker.io/library.

  • The Docker Hub library namespace is the conventional short-name default.
  • Tags and digests stay separate because tags are mutable and digests pin bytes.

Worked example

GHCR private registry image
Parse a GitHub Container Registry image reference into registry, namespace, name, and tag
Input
											ghcr.io/myorg/api-server:v2.1.0
										
Output
												Registry: ghcr.io
Namespace: myorg
Name: api-server
Tag: v2.1.0
Full reference: ghcr.io/myorg/api-server:v2.1.0
											

When to use this

Kubernetes manifests, CI scanners, and deployment reviews parse image references.

Edge cases

  • ubuntu resolves to docker.io/library/ubuntu.
  • A sha256 digest is not a tag and remains attached to the image.
  • localhost:5000 must be read as registry plus port, not a tag.

References