Text fragment link builder
Link to an exact sentence on any page. Paste the words, and get a link that scrolls to them and highlights them.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
By using this, you agree to our Terms and Privacy Policy.
Link to a sentence, not just a page
A text fragment is an addition to a link that tells the browser to scroll to some exact words and highlight them. It works even if the page has no heading link there. It looks like this:
https://example.com/article#:~:text=the%20exact%20sentence
The page itself never sees the part after :~:, so it works alongside a normal #section link.
Why hand-made text links often fail
Commas and hyphens have a special meaning inside a text fragment. If your text has a hyphen, as in "well-known" or a date range, the browser can misread it and highlight the wrong text, or nothing.
This tool encodes - as %2D, , as %2C and & as %26, so this cannot happen. Open "What got encoded, and why" above to see it.
The four fields
- Text to highlight: the words to find. This is the only one you need.
- End of range: highlights everything from the start text to these words. Use it for anything longer than a sentence. It keeps working even if the middle of the passage changes later.
- Prefix and suffix: words just before and after. They are not highlighted. Use them when your words appear more than once on the page.
Which browsers support it
Chrome, Edge, Safari and other Chromium browsers support text fragments. Firefox only does with a setting turned on. Other browsers just open the page normally, so the link never breaks. It only skips the scroll.
Two limits: the text cannot cross into another paragraph, and it has to be on the page when it first loads. Pages that load their text later may not work.
What it is good for
Pointing to one claim in a long article, the one clause in a contract that matters, or a paragraph in a bug report. Use it anywhere you would otherwise say "it's about two thirds of the way down".