Clipboard Format Detection Reaches Baseline

The Async Clipboard API gave developers a modern path to clipboard access, with navigator.clipboard.writeText() covering plain text and navigator.clipboard.write() handling most other content, including images, HTML, and rich text. One lingering gap was discoverability: before writing an SVG or other non-standard format to the clipboard, there was no clean way to know whether the browser would accept it. The typical approach was to attempt the write and catch the exception if it failed.

That gap is now closed. The static ClipboardItem.supports() method has reached Baseline Newly available status, meaning it works across all three major browser engines as of March 30, 2025. The function takes a MIME type and returns a boolean indicating whether the browser supports writing that format to the clipboard.

The simple case is checking support for a standard, natively-supported type:

const format = 'image/svg+xml';
const supportsFormat = ClipboardItem.supports(format);
console.log(`This browser does${supportsFormat ? '' : ' not'} support ${format}.`);
// "This browser does support image/svg+xml."

The more interesting case involves web custom formats. These let you work with formats the browser does not natively support, such as AVIF images. Without support detection, a clipboard write targeting an unsupported image format would fail with an exception rather than a clean check.

With ClipboardItem.supports(), this detection works for web custom formats as well. You can reliably check whether the browser will accept the format before you attempt the write, and the receiving end only needs to know how to interpret the custom format.

The result is a more predictable clipboard workflow. Developers can now test for format support ahead of time, handle edge cases more cleanly, and avoid relying on exception handling as a control-flow mechanism. As a Baseline feature, it also removes the need for feature detection libraries or user-agent sniffing when guarding clipboard format checks.