Skip to content

Copy Link to Highlight

Copies a URL that points to the text currently selected in a web page.
Readme

Copy Link to Highlight

Copy Link to Highlight creates a URL that points to the text currently selected in a web page. Opening the copied URL in a browser that supports text fragments scrolls to and highlights the first exact match for the selected text.

For example, selecting an example on https://example.com/page produces:

https://example.com/page#:~:text=an%20example

Reference: https://wicg.github.io/scroll-to-text-fragment/

About

Author: Nick Moore

Changelog

  • 2026-07-30: Initial release
Info