Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Paste Link

jose-elias-alvarezjose-elias-alvarez17k downloads

Intelligently paste Markdown links.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates14

Intelligently paste Markdown links.

Usage

Automatic

When you paste your clipboard's content into Obsidian, the plugin will check to see if it's a URL. If so, it'll insert the content as a Markdown link, using any selected text as a title. Otherwise, it'll just paste the text as normal.

Manual

If you prefer to use a separate command, you can disable the Override paste handler setting, restart Obsidian, and then use the Paste Markdown link command, which can be bound to any key combination of your choice in Obsidian's settings.

This command inserts a link if the clipboard contains a URL and behaves like the standard Insert Markdown link command otherwise, so if you like, you can replace the default Insert Markdown link keybinding with the command provided by this plugin.

Paste as plain text

If your clipboard contains a URL but you don't want to paste it as a Markdown link, use the Paste URL as plain text command, which is bound by default to Shift + Command + V on macOS / iOS and to Shift + Control + V everywhere else.

Notes

The plugin was originally inspired by obsidian-url-into-selection and seeks to improve on it in the following ways:

  • An option to disable overriding Obsidian's paste handler
  • Separate commands to control pasting behavior
  • Cleaner code, which also resulted in fixing bugs / edge cases

The ability to fetch page titles was inspired by obsidian-auto-link-title and incorporates the following improvements:

  • Using fetch() vs. an Electron window to get HTTP page titles, which is faster and more predictable
  • Page-specific handlers for sites that don't normally expose titles (e.g. Reddit)
  • An option to clean page titles using page-specific regular expressions

100% feature parity with these plugins is not a goal, but if you have a feature request or find a bug, please open an issue.

URLs

The plugin uses JavaScript's URL constructor to validate URLs. This means the following strings are considered URLs:

https://example.com
http://example.com
file:///path/to/file

But the following are not:

wwww.example.com
example.com

Additionally, URLs containing newlines are not handled, since Obsidian doesn't support multiline links.

Fetch page titles

If the Fetch page titles on paste setting is enabled, the plugin will attempt to fetch page titles from HTTP URLs and use them as link titles when Override paste handler is enabled. Alternatively, you can also fetch page titles on demand using the Paste link and fetch page title command.

Note that some pages (e.g. SPAs) may not include the full title in their HTML, and behavior may be inconsistent across platforms. Exceptions are handled on a best-case basis, and contributions to add new handlers are very welcome.

Page title regexes

You can optionally clean page titles before pasting using regular expressions. Each row in the the plugin's settings has three components, from left to right:

  1. Page regex: matches against the page's full URL to determine if this rule applies
  2. Title regex: extracts the desired part(s) from either the page title or URL
  3. Template (optional): formats the extracted parts using $1, $2, etc. for capture groups

This is how the plugin cleans page titles:

  1. The plugin checks each rule from top to bottom, stopping at the first match
  2. If the Page regex matches the current page URL, it applies the Title regex to the page's title (or to the URL itself if it's a non-HTTP URL)
  3. The Title regex extracts parts of the title (or URL) using capture groups
  4. If a Template is provided, it's filled in with captures from Title regex; otherwise, the first capture group ($1) is used (and any extra whitespace is trimmed)

This is not as scary as seems! Let's look at some examples:

  • GitHub issues: to extract just the issue title from Add dark mode support · Issue #123 · raycast/extensions:

    • Page regex: ^https?://(?:www\.)?github\.com/.+?/issue
    • Title regex: ^(.+?)\s*·
    • Result: Add dark mode support
  • YouTube videos: to remove the "- YouTube" suffix from Rust Tutorial Full Course - YouTube:

    • Page regex: ^https?://(?:www\.)?youtube\.com
    • Title regex: (.+?)(?:\s*-[^-]*$|$)
    • Result: Rust Tutorial Full Course
  • General separators: to extract content before common separators such as -, |, •:

    • Page regex: .+? (matches any URL)
    • Title regex: ^(.+?)\s*[|–—•·-]
    • Result: How to use promises (from How to use promises - Learn web development | MDN)
  • Stack Overflow template: to reformat titles like javascript - How to format dates? - Stack Overflow to emphasize the technology:

    • Page regex: ^https?://(?:www\.)?stackoverflow\.com/questions
    • Title regex: ([^-]+) - (.+?) - Stack Overflow
    • Template: [$1] $2
    • Result: [javascript] How to format dates?
  • VS Code URLs: to create titles from VS Code file URLs:

    • Page regex: ^vscode://file/
    • Title regex: ^vscode://file/.*/(.+?):(\d+) (since this is a non-HTTP URL, this matches against the URL itself)
    • Template: $1 (line $2)
    • Result: script.js (line 42) (from vscode://file/Users/username/project/script.js:42)

Additional notes:

  • To debug regexes, use the Check URL field in the plugin's settings to see if the provided URL produces the expected title.
  • If you're not good with regular expressions, copy-paste the documentation above and ask ChatGPT. (Naming things is hard.)
  • Since regexes are matched in order from top to bottom, you can set specific rules followed by general fallbacks.
  • To temporarily bypass any configured regexes, use the Paste link and fetch full page title command.
  • Regexes are parsed using the Javascript RegExp() constructor. Use regex101 for validation.

Edge cases

The paste handler tries to handle these edge cases intelligently:

  1. If your cursor / selection is inside of an existing link, it'll paste normally, to allow you to edit the existing link more easily.
  2. If you've selected an existing link, it'll replace the link's URL with the clipboard's content, keeping its title.

These edge cases are ignored when using the Paste Markdown link command to better replicate the behavior of the default Insert Markdown link command.

I've found these behaviors useful in my own testing, but if you run into problems with your workflow, please open an issue.

63%
HealthGood
ReviewRisks
About
Paste Markdown links automatically when your clipboard contains a URL, using any selected text as the link title and falling back to plain text otherwise. Fetch page titles via HTTP, handle site-specific title quirks, and provide commands to insert links or paste URLs as plain text.
LinksAutomationCommands
Details
Current version
3.3.1
Last updated
11 months ago
Created
3 years ago
Updates
14 releases
Downloads
17k
Compatible with
Obsidian 0.15.0+
License
MIT
Report bugRequest featureReport plugin
Author
jose-elias-alvarezjose-elias-alvarez
github.com/jose-elias-alvarez
GitHubjose-elias-alvarez
  1. Community
  2. Plugins
  3. Links
  4. Paste Link

Related plugins

Advanced URI

Control everything with URI.

Waypoint

Easily generate dynamic MOCs in your folder notes using waypoints. Enables folders to show up in the graph view and removes the need for messy tags!

Auto Link Title

Automatically fetches the titles of links from the web.

Task Collector (TC)

Change task status and collect tasks within a document using hotkeys and context menus.

Paste URL into selection

Paste URL "into" selected text.

Shell commands

Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications.

Link Embed

Convert URLs in your notes into embeded previews.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.

PodNotes

Write notes on podcasts with ease.

Note Linker

Automatically find and create new links between notes.