navigator.share()Limited availability
The navigator.share() method invokes the device's native sharing mechanism and passes text, links, files, and other content to share targets. Also known as the Web Share API.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–127Not supported
128+Supportedsince Aug 20, 2024
Current: 155Edge
12–92Not supported
93+Supportedsince Sep 2, 2021
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–12Not supported
12.1+Supportedsince Mar 25, 2019
Current: 27MobileChrome Android
18–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari iOS
1–12Not supported
12.2+Supportedsince Mar 25, 2019
Current: 27How to use
Not supported in Firefox. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: canShare.
Feature detection
JS · check before using
if ("Navigator" in globalThis && "share" in Navigator.prototype) {
// Navigator.share is available
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (8). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Navigator.canShare | 128 | 93 | ✕ | 14 | 75 | 96 | 14 |
| Navigator.canShare.data_files_parameter | 128 | 93 | ✕ | 14 | 76 | ✕ | 14 |
| Navigator.canShare.data_text_parameter | 128 | 93 | ✕ | 14 | 76 | 96 | 14 |
| Navigator.share | 128 | 93 | ✕ | 12.1 | 61 | 79 | 12.2 |
| Navigator.share.data_files_parameter | 128 | 93 | ✕ | 14 | 76 | ✕ | 14 |
| Navigator.share.data_text_parameter | 128 | 93 | ✕ | 14 | 76 | 79 | 14 |
| iframe.allow.web-share | 86 | 86 | 81 | ✕ | 86 | 81 | ✕ |
| http.headers.Permissions-Policy.web-share | 88 | 88 | ✕ | ✕ | 88 | ✕ | ✕ |