Choose the smallest useful package
Give the recipient an editable project document ending in .htmltoapp, not a prebuilt .app. Double-clicking the document opens the converter in HTML to App 1.1.0 or later. It does not run the page, install a Mac app, or add anything to the workspace library. Choose Export with Defaults or Customize, review access, then save the app on your Mac. The resulting export embeds its resources and no longer depends on the document.
- One page with everything inline. Save ordinary UTF-8 HTML, starting with
<!doctype html>, with the extension.htmltoapp. Keep its CSS, JavaScript and artwork inside it. Download Word Count for a complete example. Open it in a text editor to read the entire tool. It requests no permissions. - A project with separate assets. Put the static website in a standard ZIP named
My Tool.htmltoapp. Download Screen Ruler for an example from the gallery. Its HTML, CSS, JavaScript and PNG are separate files. Export it, choose a display, and place the ruler to try a shaped window. Choose Edit to return to setup. - To edit a received ZIP in the workspace, make a copy, give that copy a
.zipextension, extract it, then use Add Project Folder on the folder containingindex.html. For plain HTML, make a copy namedindex.htmlin a folder. Use Project > Share Project to share your edits again.
Work in the builder or convert from Finder
- Convert without a project. In Finder select one HTML file or website folder, then choose Services > Convert HTML to App. The workspace also has a Convert HTML to App button. Choose the whole folder if the HTML references neighboring files. Use Customize to choose a name and icon, style the icon label and its outline, set Dock effects, and review file associations and permissions. These export settings are separate from the JavaScript bridge.
- Edit a project. Use the + beside Projects to create a starter, add a folder in place or create an editable copy from the Example Gallery. Save text edits with Command-S. Select a PNG or SVG to preview it, replace it with the same format or show it in Finder. Run opens a WebKit preview. Checks & Output shows diagnostics. Check Project checks saved static HTML and CSS references, not every path generated by JavaScript.
- Choose how an app loads its source. Embedding includes a snapshot and needs no original folder. Linking loads the original location on each launch. Reload after editing the files. If the source moves, use Locate Folder or Locate HTML File in the export to reconnect it. The linked source is read-only to the exported app. Files separately opened with Editor access are a different permission. Opening a portable document always produces an embedded export.
- Manage the source safely. Duplicate Project copies a folder. Remove from List forgets the workspace entry without deleting files. Move to Trash moves the actual folder and its contents to Finder's Trash. Apps linked to that location can stop loading. Use Reconnect Folder for an existing project that has moved. In the Files list, the context menu also offers Show in Finder, Copy Relative Path, Duplicate File and Move to Trash where applicable.
- Try the export. Choose Open App or Show in Finder after saving. The result uses the fixed sandboxed launcher for local use, not a notarized distribution build. The Mac App Store edition offers optional, user-installed local approval automation. Setapp handles that step with its bundled helper. See the first-launch instructions. Right-click a running export's Dock icon for Open HTML to App, when the builder is installed, or Visit HTML to App Website.
Lay out the source
For a multi-file tool, keep the lowercase index.html at the ZIP root like this. One enclosing project folder is also accepted. No manifest, build script, signing key or executable is required.
index.html
style.css
app.js
ProjectIcon.png
data/sample.json
Use a real document title, UTF-8 and a viewport declaration. Load local CSS in the head. Use a deferred script or a JavaScript module. Relative URLs such as ./data/sample.json and imports such as ./lib/format.js work without starting an HTTP server. Match filename case. Use actual files or hash navigation, not a server route that rewrites to the entry page. Bundle fonts, images and libraries the tool needs offline. For a framework project, package the output of its static build, not its development server or dependency directory.
Use the following command from inside the example project folder above, with a new output name. It names the files explicitly so local credentials and unrelated files do not get swept into the archive. Adapt the list to the actual project. If your archiver produces a normal .zip, rename it to .htmltoapp without changing the bytes.
zip -X "../My Tool.htmltoapp" index.html style.css app.js ProjectIcon.png data/sample.json
unzip -t "../My Tool.htmltoapp"
Use stored or deflated, unencrypted ZIP entries. Include only regular files and directories with relative names. Do not include symlinks, absolute paths, parent components, conflicting names that differ only by case or Unicode normalization, or nested ZIPs in place of the site. Omit .git, .env files, build caches, credentials and personal data. The importer accepts up to 256 MiB of input, 512 MiB expanded, 4,096 entries, 32 path levels and a 32 MiB HTML entry. These are ceilings, not targets. Keep the entry small and put media in separate files.
Supply editable artwork
For a folder, put a real square PNG named ProjectIcon.png beside index.html. This makes it easy to replace. Without a usable PNG, HTML to App checks <meta name="htmltoapp:icon" ...> in the head, then a supported favicon. Use simple static SVG or PNG. Inline icons are limited to 256 KiB decoded. Separate raster artwork may be up to 8 MiB. Remote or active SVG artwork is not supported.
Both the icon meta tag and <link rel="icon" href="./art/icon.png"> can refer to a project-local file. For a single-file project, inline it instead. PNG is the most portable raster choice. The importer also recognizes JPEG, WebP, GIF, ICO, ICNS, TIFF, BMP, HEIC and AVIF if the system image decoder supports them. The result is static artwork, not an animated GIF. For SVG use paths, shapes, gradients or clip paths with presentation attributes. Avoid CSS styles, text elements, filters, embedded images and external references. A local SVG has the same 256 KiB limit as an inline one. These icon restrictions do not limit SVG drawn inside the project's own web page.
For a single-file tool, include the image in the HTML itself. Encode the hash in an SVG color as %23. The Word Count download shows a complete example.
<meta name="htmltoapp:icon" content="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='29' fill='%23235455'/%3E%3C/svg%3E">
The workspace's Set Project Icon can override the default. When a ZIP needs separate document artwork without modifying the site's own artwork, put ProjectIcon.png and a directory named Website/ side by side, with Website/index.html and its resources inside. In this layout, do not also put an index.html at the package root. Document artwork takes precedence over website artwork. The user can still choose different artwork in the export wizard.
Start a menu bar app without a Dock icon
For a normal windowed app, no extra metadata is needed. For a menu bar utility, add this tag to the entry page's <head>, then export with HTML to App 1.1.1 or later.
<meta name="htmltoapp:dock-visible" content="false">
This chooses the Dock icon's state at launch. It does not create a menu bar item or hide the window. Create the item with HTMLtoApp.menuBar.setIcon() and give its menu Show Window and Quit actions. To change the launch default of an existing app, re-export after editing the tag, even when the site is linked to its original folder.
To let the user change the icon while the app is running, see show or hide the Dock icon. Test this in the exported app. A project can find the system Dock in Preview as well.
Request only what the tool needs
Inside the document head, within the first 768 KiB, use htmltoapp:open-with to suggest export settings. The user reviews them. Metadata does not grant a permission. A tool without file associations or optional permissions needs no tag.
<!-- A text viewer that reads opened documents and saves a separate copy. -->
<meta name="htmltoapp:open-with" content="role=viewer; files=txt,md; folders=false">
Use role=editor only for a tool that intentionally writes back to opened items. Give a comma-separated list of actual extensions, without dots or wildcards. Use folders=true only if the tool handles folders. For a camera tool use camera=true. Other independent options are microphone=true, location=true, listInstalledApps=true and openInstalledApps=true. A launcher that needs both app permissions can use permissions=ListInstalledApps,OpenInstalledApps. User choices, including previously disabling a suggestion, take precedence.
For Finder file registration, files=true alone is not enough. Use files=txt,md or provide a separate extensions=txt,md list. A folder-only viewer can use role=viewer; folders=true without file extensions. A permission-only tag such as permissions=camera does not register any file type.
When updating an older project, the builder also recognizes mic or audio for microphone and geolocation or gps for location. It accepts the legacy meta name htmltoapp-open-with and explicit head comments such as <!-- htmltoapp:open-with: role=viewer; files=txt -->. For a new project, use the meta tag shown above rather than maintaining two declarations.
Keep project files separate from saved data
The project runs in system WebKit on a local origin. It cannot run Node.js, Python, PHP, shell scripts or a local HTTP service. Use relative fetch requests and ES modules for project resources. External services still need connectivity and must allow the request. A custom project origin does not bypass CORS or guarantee every HTTPS-only browser API.
Store preferences in localStorage and structured data in IndexedDB. That data belongs to the app identity and web origin. It is not written into the project or its portable document. Preview and the exported app have separate stores. Provide a real backup/import flow for valuable user records, especially when moving to another Mac. Preserve existing records during schema changes.
On repeat export, Keep Existing Data retains the identity and storage of a recognized replacement. Create a Fresh Copy uses an unused destination and an independent identity. Reset Website Data needs a matching export and an explicit confirmation. The updated app clears its own WebKit data once on launch, not project files or external documents. Replacing an unrecognized bundle via Replace Anyway is not a migration. The new app starts with empty website data. Use a different destination to preserve the old app.
Find a working gallery example
In the workspace choose + > Example Gallery, select an example and choose Create Project. You get editable source, so you can inspect a feature without changing the bundled original.
| What you want to build | Examples to open |
|---|---|
| A widget or a display-edge launcher | Screen Ruler for shaped hit regions, Tracing Paper for a floating reference, Edge Shelf for app icons and launch consent, and Cue Cards for presentation across displays. |
| A menu bar utility or live Dock icon | Menu Bar Controls for hiding and showing the Dock icon, Focus Dial for a countdown, Desk Clock for an analog clock, and Notifications and Badge for native alerts and counts. Test the app's own Dock icon after export. |
| A document or folder tool | Text Editor for writing back to an opened document, Folder Board for scoped browsing, CSV Cleaner and Subtitle Repair for saving a new copy, and Contact Sheet for processing a folder of images. |
| A viewer or drawing tool | Image Viewer, Audio Player and Video Player open local media. Geometry Pad draws and exports a PNG. Camera Viewer captures stills when camera access is available. |
| A local data or integration example | Field Guide loads local JSON. Icon Pairs uses sample artwork or installed app icons. Native Integration Demo combines files, menu bar actions, notifications and badges. |
Project delivery checklist
- Build the working tool the person requested, not a description or a mockup. Start with a useful initial state, a clear primary action and an accessible result. Use real buttons and labels, keyboard focus, readable contrast and layouts that fit a narrow window. Keep system window decorations unless the project really needs a widget.
- Use only the native APIs in the bridge reference. A browser has no bridge. Detect each optional feature, explain unavailable actions, and keep ordinary web functions usable. Do not provide invented success responses. Show progress for slow file operations and handle cancellation or denial.
- Test with the network off. Check relative fetches, imports, artwork, empty and error states, keyboard access and smaller window sizes. Register native event listeners before reading their initial snapshots. Never ask for privacy access until the relevant user action.
- Inspect the delivered archive, not just the source tree. Test its ZIP integrity, extract into a fresh folder, and verify assets and filename case. For plain HTML, test with no neighboring files. Do not include a native launcher, a fake app bundle or any developer credentials.
- Deliver the actual
.htmltoappfile. State what it does, which permissions are needed and why, where user data lives, and what was actually tested. Give the recipient the converter steps above. Within the workspace use Run and Check Project. Test Finder delivery, Dock artwork, permissions and saved data in the exported app when those behaviors matter. A successful browser test alone does not verify macOS integration.