Illustration of a link at the end of a sentence with the final full stop cut away by scissors

Text & writing

Why Copied URLs Pick Up Trailing Punctuation

A link at the end of a sentence often breaks when copied or auto-linked: the full stop, closing bracket, or quote mark after it gets treated as part of the address. This happens because many of those characters are technically allowed in URLs. Here is how software decides — and how to write links so they survive.

Ready to try the tool this guide describes?

Why the ambiguity exists

Full stops, commas, brackets, and question marks can all legally appear inside a URL. A path can end with a full stop and a query starts with a question mark. So when text says “see https://example.com/page.”, software cannot know for certain whether the full stop belongs to the link or the sentence. It has to guess.

How good link detection guesses

  • Characters that usually end sentences — . , ; : ! ? — are dropped from the very end of a link.
  • Closing quotes are dropped from the end.
  • A closing bracket is kept only if the link contains a matching opening bracket, so Wikipedia links such as …/Mercury_(planet) stay whole while “(see https://example.com)” loses the final bracket.
  • Spaces, angle brackets, and straight quotes always end a link.

Markdown and chat formatting

In Markdown, [text](https://example.com) wraps the link in brackets that belong to the formatting, not the URL. In chat apps and plain text, surrounding asterisks or underscores for bold or italics can also end up attached. Bracket balancing handles the Markdown case; formatting characters sometimes need removing by hand.

Writing links that survive

  • Put a space between the link and any following punctuation when the link matters more than the typography.
  • Wrap links in angle brackets — <https://example.com> — a convention the URL standard itself suggests for links in plain text.
  • Put links on their own line in emails and documents that will be copied.

URLs and Trailing Punctuation FAQ

Why does my link include the full stop at the end?
Full stops are legal inside URLs, so some software keeps it. Better link detection removes sentence punctuation from the end.
Why are Wikipedia links with brackets sometimes cut short?
Some tools drop every closing bracket. Better ones keep it when the link contains the matching opening bracket.
Can a URL really end with a full stop?
Technically yes, but it is so rare that treating a final full stop as sentence punctuation is almost always right.
What is the safest way to write a link in text?
Surround it with angle brackets or spaces, or put it on its own line.
Does Looty Tools keep query strings when trimming punctuation?
Yes. Only punctuation at the very end is trimmed; everything after ? and # stays.

Related guides

Open the tool

Jump into Extract URLs from Text when you are ready to process your files.

← Back to all guides

More from Looty

Explore Looty’s Ecosystem

Discover more ways Looty can help you learn, organize, create, and make an impact.