Copy Link to Highlight: Free Tool to Link to Any Text
Paste a page address and the words you want to point at. Get a link that opens the page scrolled to that text, highlighted. Free, no sign-up.
Runs entirely in your browser. Nothing you paste or open is uploaded.
How to Make a Link That Highlights Text
Paste the page address
Copy the URL from the address bar of the page you want to point at and paste it into the first box. If it already has a #section part, the tool keeps it.
Paste the passage
Select the words on the page, copy them and paste them into the passage box. Copying from the page itself matters, because the link only works if the text matches what’s on the page, curly quotes and all.
Choose exact text or a range
Short passages go into the link word for word. For long passages, Auto keeps the first and last few words as a start…end range, so the link stays short and still highlights everything in between.
Add context if the words repeat
If the same words appear more than once on the page, add a few words that come just before or just after them. The browser then highlights the right one instead of the first.
Copy it and test it
Copy the link, or the ready-made Markdown or HTML version, and press Test in new tab to see the page scroll to and highlight your passage.
What Is a Text Fragment Link?
A text fragment link is an ordinary web address with an extra instruction at the end that tells the browser which words to find. It looks like this: https://example.com/page#:~:text=the%20exact%20words. When someone opens it, the browser scrolls to the first place those words appear and highlights them, usually in yellow or purple depending on the browser.
The feature is often called scroll to text fragment, which is the name of its original proposal, and it is written up by the Web Platform Incubator Community Group (WICG) as “URL Fragment Text Directives”. Chrome shipped it first in version 80 in early 2020, and it has since reached every major engine, including Firefox and Safari.
The part after # has always been the fragment, used to jump to an element with a matching id, like #installation. Text fragments add a fragment directive, marked by the delimiter :~:, after it. Everything after :~: is read by the browser and then removed from what the page’s own scripts see, so a site can’t read which words you linked to through location.hash, and old #section anchors keep working.
The instruction itself is a text directive: text= followed by the words to find. There are four possible parts: an optional prefix, the start text, an optional end text and an optional suffix. With only a start, the browser highlights that exact string. With a start and an end, it highlights everything from the first match of the start to the next match of the end, which is how you link to a whole paragraph without putting the whole paragraph in the URL.
Matching is case-insensitive, so text=bees also finds “Bees”. Each part must sit inside one block of the page, such as one paragraph or list item, but a start…end range can cross from one block to another. If the words aren’t found, nothing breaks: the page opens at the top, or at the #section anchor if the link had one.
“Copy link to highlight” is the name Chrome and Edge give the right-click menu item that builds these links for you, and Firefox uses the same name. Safari calls it “Copy Link with Highlight”. This tool makes the same kind of link from any browser, including ones without the menu item, and gives you control over the parts the menu picks for you.
How to Copy a Link to Highlight in Chrome, Edge, Firefox and Safari
Most current browsers can make these links without any tool. Select the text, right-click (or Control-click on a Mac, or long-press on a phone) and choose the menu item. The link is copied to your clipboard. Here is where to find it and which version added it.
| Browser | Menu item | Added in | How to use it |
|---|---|---|---|
| Chrome (desktop) | Copy link to highlight | Chrome 90 (April 2021) | Select text, right-click, choose Copy link to highlight. Right-click a highlight and choose Remove highlight to clear it. Chrome also offers it on Android, iPhone and iPad. |
| Microsoft Edge | Copy link to highlight | Chromium-based Edge; version not published | Select text, right-click, choose Copy link to highlight. |
| Firefox (desktop) | Copy Link to Highlight | Firefox 145 (11 November 2025) | Select text, right-click, choose Copy Link to Highlight. Firefox could open these links from version 131, before it could make them. |
| Safari (Mac, iPhone, iPad) | Copy Link with Highlight | Safari 18.2 (December 2024; macOS 15.2, iOS 18.2, iPadOS 18.2) | Select text, then Control-click on a Mac or tap and hold on iPhone and iPad, and choose Copy Link with Highlight. |
| Brave, Vivaldi, Opera | Varies | Not checked | These use Chromium, so they open and highlight text fragment links like Chrome. Whether the menu item is present depends on the browser’s own menu; if it isn’t there, use this tool. |
If Chrome’s menu item is greyed out, Google’s help page says the feature may not work for that selection. That usually means the text is inside an element the generator can’t reach, such as a form field, an iframe or a canvas. Paste the text here instead, and test the result.
Which Browsers Support Scroll to Text Fragment?
Opening a text fragment link works in every current major browser. The versions below are the first ones that scroll to and highlight the text, according to caniuse and MDN. Older browsers ignore the :~: part and open the page normally, so a text fragment link is always safe to share.
| Browser | Opens text fragment links from | ::target-text styling from | Notes |
|---|---|---|---|
| Chrome | Version 80–81 (2020) | Version 89 | caniuse lists 81; Chrome’s own announcement says 80. The first to ship. |
| Edge | Version 83 | Version 89 | Same Chromium engine as Chrome. |
| Opera | Version 68 | Chromium-based | Same engine as Chrome. |
| Samsung Internet | Version 13.0 | Chromium-based | Android. |
| Firefox | Version 131 (October 2024) | Version 131 | caniuse notes Firefox still has open issues with some pages. |
| Safari (Mac and iOS) | Version 16.1 (2022) | Version 18.2 | Could open links two years before it could create them. |
Text Fragment Syntax Reference
The full form of a text directive is #:~:text=[prefix-,]textStart[,textEnd][,-suffix]. Square brackets mark the optional parts. Commas separate the parts, a dash after the prefix or before the suffix marks them as context, and an ampersand separates several directives.
| Part | Example | What it does |
|---|---|---|
| :~: | #:~:text=… | The fragment directive delimiter. Anything after it is for the browser, not the page. |
| #fragment:~: | #install:~:text=npm | Keeps an ordinary anchor. Browsers without text fragments still jump to #install. |
| textStart | text=open%20source | The text to highlight. With nothing else, the first exact match is highlighted. |
| textStart,textEnd | text=Chapter%201,the%20end | Highlights from the first match of the start to the next match of the end after it. |
| prefix-, | text=in-,Paris | Words that must come just before the match. Only whitespace may sit between them. |
| ,-suffix | text=Paris,-Texas | Words that must come just after the match. |
| &text= | text=one&text=two | Several passages in one link. Each gets its own highlight; the page scrolls to the first. |
| %2D | text=well%2Dknown | A dash inside the text must be percent-encoded, or it reads as a prefix or suffix marker. |
| %2C | text=red%2C%20green | A comma inside the text must be encoded, or it splits start and end. |
| %26 | text=salt%20%26%20pepper | An ampersand must be encoded, or it starts a new directive. |
| %20 | text=two%20words | Spaces are encoded. Emoji and accented letters are encoded as UTF-8 bytes, e.g. 🦊 becomes %F0%9F%A6%8A. |
The spec lets letters, digits and ! $ ’ ( ) * + . / : ; = ? @ _ ~ appear unencoded. This tool also encodes ( and ), because Markdown and many chat apps end a link at the first closing bracket.
Examples: When a Link to Text Fragment Helps
A link to a text fragment saves the reader from scrolling and searching. These are the situations where it earns its place.
- Citing a source. Instead of “see the docs”, link to the one sentence that answers the question: https://developer.mozilla.org/…/Text_fragments#:~:text=percent%2Dencoded.
- Support replies. Point a customer at the exact step in a long help article, so they don’t skim past it.
- Code reviews and issues. Link to the paragraph of a spec or changelog that explains a behaviour, with a start…end range covering the whole paragraph.
- Research notes. Keep a list of quotes, each a link that reopens the source with the quote highlighted, so you can check context later.
- Long legal or policy pages. Link to one clause of terms of service, adding a prefix like “Section 4-,” when the same wording appears in several sections.
- Several points at once. Use multiple fragments to highlight three separate sentences in one link, for example every place a page mentions a price.
Why Does the Link Open but Not Highlight?
When a text fragment link opens the page but nothing is highlighted, the browser didn’t find a match, or it wasn’t allowed to look. Work through these causes in order.
- The text changed. Pages get edited. If one word in the passage no longer appears, the whole directive fails. Shorter start and end terms survive edits better than a full passage.
- The text loads later. Browsers search once the page has loaded. Text that arrives afterwards, from infinite scroll, “show more” buttons, collapsed accordions or single-page apps that render late, may not be found.
- A part crosses a block. Each of the prefix, start, end and suffix must sit inside one paragraph, heading or list item. If your start runs from a heading into the paragraph below, split it into a start…end range instead. This tool does that automatically when the passage has line breaks.
- Hidden characters. Copying can pick up non-breaking spaces, soft hyphens, straight quotes where the page has curly ones, or text added by CSS. Copy the passage directly from the page, and trim it if the link still fails.
- The site opted out. Chromium browsers honour the Document-Policy: force-load-at-top response header, which stops pages from scrolling on load, including to text fragments.
- It was opened by a script or in a frame. The browser only acts on text fragments after a real click or typed navigation, and never inside an iframe. Links opened by some apps’ in-app browsers or previews may not highlight.
- The browser is old. Chrome before 80, Firefox before 131 and Safari before 16.1 ignore the directive and simply open the page.
- The highlight is there but invisible. Sites can restyle it with the ::target-text CSS pseudo-element. A poor colour choice can make the highlight hard to see even though the page scrolled to it.
The page also scrolls to the first match only. If the passage appears earlier on the page, for example in a summary box, add a prefix or suffix, or use the checker below the tool to confirm what the link asks for.
Privacy and Security Rules for Text Fragments
Text fragments are designed so that a link can’t be used to find out what is on a page you can see but an attacker can’t, such as your inbox or a signed-in dashboard. The spec and browsers enforce several limits for this reason.
First, a user activation is needed. The browser only searches for the text on a navigation that follows a real user action, such as clicking a link or typing an address, not one started silently by a script. Second, text fragments only apply to the top-level page. A page can’t load another site in an iframe with a text fragment to test whether some words are there.
Third, when a link crosses from one site to another, the new page must be opened without a reference back to the page that opened it (noopener). That stops the opening page from watching whether the new page scrolled. This tool’s Test button opens your link that way. Fourth, the spec asks browsers to take the same time to search whether or not the text is found, so timing can’t leak the answer.
Finally, scripts on the page can’t read the directive. The :~: part is stripped from location.hash and from the URL the page sees. The document.fragmentDirective object exists only so a site can check that the browser supports the feature. Remember, though, that the full link, words included, is still visible to anyone you send it to and in your browser history, so don’t put private text in a link you share.
How This Tool Works and What Happens to Your Data
Everything happens in your browser. The page address and passage you type are turned into a link by JavaScript on this page. Nothing is sent to our server or anyone else’s, and the tool doesn’t fetch the target page, so it can’t see whether the text is really there. That’s what the Test button is for.
To build the link, the tool collapses runs of spaces and line breaks into single spaces, percent-encodes each part with the same rules as JavaScript’s encodeURIComponent, then also encodes dashes and brackets. It splits your address at # so an existing anchor is kept, and replaces any text directive already in the link unless you ask it to add to them.
In Auto mode, a passage longer than 80 characters becomes a range: the first few words become the start and the last few become the end. A passage that spans several paragraphs always becomes a range, with the start taken from the first paragraph and the end from the last, because a single term can’t cross a paragraph break. You can choose how many words to keep at each end.
The checker does the reverse. It splits a link at :~:, separates the directives at each &, splits each one at its commas, works out which part is the prefix, start, end or suffix, and decodes them so you can read them. It warns about characters that should have been encoded, broken % escapes and parts that don’t fit the syntax.
Ways to Make a Text Fragment Link Compared
| Method | Good for | Limits | Verdict |
|---|---|---|---|
| Browser menu (Copy link to highlight) | Quick one-off links while reading | Picks the start, end and context for you; no multiple passages; missing in some browsers | The fastest option when it’s there |
| This tool | Links from any browser, several passages, links you need to control or fix | Doesn’t load the page, so test the link before sharing | Best when the menu fails or you need exact control |
| Typing it by hand | Tiny edits to an existing link | Easy to forget to encode a dash, comma or ampersand | Fine for one word; error-prone for more |
| Browser extensions | Saving many highlights as you read | Needs page access permissions | Worth it only if you do this every day |
Frequently Asked Questions
What does “copy link to highlight” mean?
“Copy link to highlight” is a right-click menu item in Chrome, Edge and Firefox that copies a link to the page with the text you selected built into it. Whoever opens the link is scrolled to that text, and it’s highlighted. Safari has the same feature under the name “Copy Link with Highlight”.
Why don’t I see “Copy link to highlight” when I right-click?
You need to select some text first; the item only appears on a selection. It also needs Chrome 90 or later, Firefox 145 or later, or Safari 18.2 or later. If it’s missing or greyed out, paste the page address and text into this tool instead.
Does a link to a text fragment work in every browser?
It opens in every browser, and highlights in current Chrome, Edge, Opera, Samsung Internet, Firefox (131 and later) and Safari (16.1 and later). Browsers without support ignore the :~: part and open the page at the top, or at the #anchor if there is one.
What does #:~:text= mean in a URL?
It’s a text fragment. The :~: marks the start of instructions for the browser, and text= gives the words to find and highlight. The part after text= is percent-encoded, so %20 is a space and %2D is a dash.
How do I link to highlighted text on a phone?
In Chrome on Android, iPhone or iPad, select the text and use the option to share or copy a link to the highlight. In Safari on iPhone and iPad, select the text, tap and hold, and choose Copy Link with Highlight. This tool also works on a phone browser.
Can I highlight more than one passage with one link?
Yes. Add several text directives joined with &, like #:~:text=first&text=second. Each passage is highlighted and the page scrolls to the first one. Use Add another passage in the tool to build one.
How do I remove the highlight?
Click anywhere on the page or reload it without the part after #. In Chrome you can also right-click the highlight and choose Remove highlight. The highlight never changes the page for anyone else.
Can a website block text fragment links?
Yes, in Chromium browsers. A site can send the Document-Policy: force-load-at-top header, which stops the page from scrolling on load, including to a text fragment. The link still opens the page.
Can the website see which text I linked to?
Not directly. Browsers never send the part after # to the server when they load a page, and they hide the :~: part from the page’s own scripts. Anyone you share the link with can read the words in it, though, so keep private text out of it.
Why does my text fragment link highlight the wrong place?
The browser highlights the first match on the page. If the same words appear earlier, add a prefix or suffix, a few words just before or after your passage, so only the place you mean matches.
Related
- ToolsURL CleanerRemove tracking parameters like utm_*, fbclid and gclid from one link or a whole list, and see what each one did.
- ToolsURL ExtractorPull every link out of text, HTML, Markdown or an email. Dedupe, filter by domain, export TXT or CSV.
- FeaturesSave Tabs in One Click and Close Them Without Losing ThemSave tabs from any window as a named session in one click or with Ctrl/Cmd+Shift+S. Groups, pinned tabs and order are kept. Free, with no limit on tabs.
- ToolsBulk URL OpenerPaste a list of links and open them all at once, or save them as a session.
Keep Your Tabs Safe, Too
BelayTab saves and snapshots your tabs automatically, in every browser. Free.