Web Share Target API Manifest Generator
Generate a share_target manifest fragment for a progressive web app that
receives shared text, links, or files.
Generator
Generated output
Introduction
The Web Share Target API allows your progressive web app to appear as a destination in the operating system share sheet. Users can share text, links, and files directly into your app.
The configuration lives inside the web app manifest under the
share_target member. Small mistakes in the action URL, HTTP method,
encoding type, or parameter names can prevent the feature from working correctly.
How it works
This tool collects your configuration, validates common requirements, and outputs a JSON fragment you can merge into your existing web app manifest. It also generates a starter handler snippet based on the selected HTTP method.
- GET shares pass data through query parameters.
- POST shares usually require a service worker or server endpoint to process form data.
- File shares require POST and
multipart/form-data. - All generation happens locally in your browser.
How to use
- Enter the action URL that should receive shared content.
- Choose GET or POST.
- Select the shared parameters your app accepts.
- Add file fields if your app accepts files.
- Click Generate share target.
- Copy the manifest fragment into your web app manifest.
- Review and integrate the handler snippet.
Practical example
A POST file-sharing target may look like this:
{
"share_target": {
"action": "/share-target/",
"method": "POST",
"enctype": "multipart/form-data",
"params": {
"title": "title",
"text": "text",
"url": "url",
"files": [
{
"name": "media",
"accepts": "image/*"
}
]
}
}
}
Use cases
- Allow users to share links into a note-taking PWA.
- Receive images from the native share sheet.
- Accept shared text snippets for later processing.
- Prototype a share target before writing custom manifest JSON.
- Debug why a PWA is not appearing in the share sheet.
Best practices
- Keep the action URL within your PWA scope.
- Use POST for file sharing.
- Use
multipart/form-datawhen files are involved. - Validate shared data before storing or displaying it.
- Provide a clear landing experience after the share is received.
Common mistakes
- Using GET while declaring file parameters.
- Using the wrong encoding type for file uploads.
- Forgetting to register a service worker for POST handling.
- Using parameter names that do not match the handler code.
- Pointing the action URL outside the app scope.
Limitations
- This tool does not test your live PWA or service worker.
- Share sheet availability depends on operating system and browser support.
- File type support can vary by platform.
- The generated handler snippet is a starting point, not a complete production backend.
Browser compatibility
- Android Chrome: Strong Web Share Target support.
- Desktop Chrome and Edge: Support varies by platform and installation state.
- Safari: iOS sharing behavior differs and may not support all Web Share Target features.
FAQ
Is my configuration uploaded anywhere?
No. The tool processes everything locally in your browser.
Do I need a service worker?
For many POST share targets, yes. A service worker can intercept the POST request, read the form data, and redirect the user to an appropriate page.
Can I share multiple file types?
Yes. You can list multiple accepted types for a file field, such as
image/* and video/*.
Why is my app not appearing in the share sheet?
Common causes include an invalid manifest, missing installability criteria, an action URL outside the app scope, unsupported platform behavior, or the app not being installed.