How macOS Clipboard Works and How Pasteon Enhances It
A practical look at how macOS NSPasteboard works, why copied content can contain multiple formats, and how Pasteon builds clipboard history, previews, actions, source app filtering, and rich object support on top of it.
How macOS Clipboard Works, and How Pasteon Turns It Into a Productivity Layer
The macOS clipboard looks simple: copy something, paste it somewhere else. Under the hood, though, it is powered by NSPasteboard, a flexible system that can carry multiple versions of the same copied content at once.
The Clipboard Is Not Just Text
When you copy content on macOS, the system does not usually store only one value.
For example, copying formatted text from a webpage may include:
- Plain text
- HTML
- Rich text
- Source URL
- App-specific metadata
Copying an image may include:
- PNG data
- TIFF data
- File URL fallback
- Private app data
This is why pasting the same copied item into different apps can produce different results. A code editor may prefer plain text, while a rich editor may use HTML or RTF.
Pasteon keeps this idea at the center of its design: a copied item is not just “a string.” It can be text, URL, JSON, color, image, video, file, Markdown, HTML, or even an app-specific object.
How Pasteon Detects Useful Content
NSPasteboard gives apps access to pasteboard types such as plain text, HTML, image data, file URLs, and custom private types.
Pasteon builds a richer local model on top of that. When new clipboard content is detected, Pasteon derives a practical type from the available data.
For text content, Pasteon can recognize common formats such as:
- JSON
- Color values
- URLs
- Timestamps
- Dates
- HTML
- Markdown
- Plain text
This matters because different content types deserve different actions. JSON can be formatted or pasted as a file. A URL can be previewed or transformed. A color can be converted between HEX, RGB, RGBA, HSL, and HSLA. Text can be saved as a TXT file or converted between naming formats.
Clipboard History Needs More Than Storage
A basic clipboard manager saves past copies. Pasteon tries to make those copies usable.
That means each history item needs enough metadata to answer questions like:
- What type of content is this?
- Which app did it come from?
- Is there a preview available?
- Can it be pasted back with fidelity?
- What actions make sense for this item?
This is why Pasteon tracks source app information when possible. The new source app filter makes it easier to narrow history by where content came from, such as Figma, Notion, Safari, Xcode, or VS Code.
Instead of searching through every copied item, you can ask a more natural question: “Show me what I copied from this app.”
Source App Information Is Not Built In
One important limitation of NSPasteboard is that it does not directly tell you which app placed content on the clipboard.
Apps usually have to infer the source by checking the current frontmost application around the time the clipboard changes. This is not perfect, but it is useful enough for building source-aware history.
Pasteon uses this source information to improve the browsing experience, including app icons, app names, and source filtering.
Previews Should Be Helpful, Not Intrusive
Clipboard previews are powerful, but they need to be careful.
For example, previewing a file by reading its contents can trigger macOS privacy prompts if the file belongs to another app or a protected location. Pasteon treats this as a product decision, not just a technical one.
That is why file content preview can be disabled, and when disabled, Pasteon shows a lightweight file card instead of automatically reading external file contents.
For different types, Pasteon uses different preview strategies:
- Text, Markdown, and HTML can be shown as raw text.
- URLs can optionally be previewed or shown as plain URL text.
- Images and videos use media previews.
- PDF and text files can be previewed when file content preview is enabled.
- Unknown files fall back to icons and metadata.
The goal is simple: preview should make history easier to understand without slowing down the main interaction.
Actions Turn Clipboard History Into Workflows
Pasteon also uses content type detection to offer contextual actions.
For example:
- JSON can be formatted or pasted as a
.jsonfile. - Plain text can be pasted as a
.txtfile. - Markdown can be saved as a
.mdfile. - URLs can be converted into Markdown links.
- Images can be converted or pasted as PNG.
- Colors can be converted through a focused secondary menu.
- Naming formats can be converted between
camelCase,snake_case,kebab-case, and more. - cURL commands can be converted into URLSession, fetch, or Axios snippets.
These actions work best when they stay close to the content. A JSON item should not need the same menu as an image. A color should not be treated like a normal text snippet.
Rich App Objects: Notion and Figma
Some apps put private object data on the pasteboard.
Figma and Notion are good examples. When you copy a Figma layer or a Notion block, the pasteboard may include app-specific types in addition to fallback text, HTML, or image data.
Pasteon can preserve these richer pasteboard objects as app objects. The goal is best-effort fidelity:
- Paste back into the original app as an editable object when possible.
- Show a useful fallback preview in Pasteon.
- Paste into other apps using fallback content such as text, HTML, or image data.
This approach respects how macOS pasteboard is designed: multiple representations can coexist, and the receiving app chooses the one it understands best.
Clipboard Monitoring Should Stay Lightweight
macOS does not provide a dedicated clipboard change notification for every use case, so clipboard managers often monitor changeCount on NSPasteboard.general.
Pasteon uses clipboard monitoring to detect new content, but it also needs to avoid unnecessary work. Some content can be large, private, or expensive to preview.
That is why Pasteon separates capturing from previewing. The app can record enough information to make an item useful, while deferring heavier preview work until the user actually selects the item.
Pasteon also supports pausing clipboard recording from the menu bar. When paused, the app stops recording new clipboard history while still allowing users to search, copy, paste, and manage existing items.
Privacy Is Part of the Product
A clipboard app sits close to sensitive user data. Passwords, tokens, private links, work documents, and app-specific objects can all pass through the pasteboard.
Good clipboard design should therefore include:
- Clear type detection
- Careful preview behavior
- Avoiding unnecessary file reads
- Respect for concealed or transient pasteboard types
- User control over recording and preview settings
Pasteon’s goal is not to grab everything blindly. It is to preserve what is useful, avoid surprising the user, and keep common workflows fast.
From Clipboard to Workspace
NSPasteboard is the foundation. Pasteon builds a workspace on top of it.
The system clipboard gives us multiple data formats, file references, images, HTML, URLs, and app-private types. Pasteon turns those raw ingredients into searchable history, previews, source app filters, contextual actions, and cross-device workflows.
The result is a clipboard that feels less like a temporary buffer and more like a lightweight memory layer for daily work.