Skip to content
AgileLogics

Share Link Generator

Builds a pre-filled share link for a URL on Twitter/X, Facebook, LinkedIn, WhatsApp, or email.

How it works

Enter a URL, choose a platform and optional text, then click Generate.

What is a share link?

A share link is an ordinary URL that opens a social platform's share or compose screen with your page already filled in. Put one behind a button and visitors can share without your site loading any third-party widget script. This tool builds that URL for X, Facebook, LinkedIn, WhatsApp or email from a page address and optional text.

The five formats

Each platform puts the page URL and your text in a different place. Here's exactly what the tool generates when you supply share text ({url} and {text} stand for the percent-encoded values):

Platform Generated link Uses your text?
Twitter / X (default) https://twitter.com/intent/tweet?url={url}&text={text} Yes, as the post text
Facebook https://www.facebook.com/sharer/sharer.php?u={url} No
LinkedIn https://www.linkedin.com/sharing/share-offsite/?url={url} No
WhatsApp https://wa.me/?text={text}%20{url} Yes, before the link
Email mailto:?subject={text}&body={url} Yes, as the subject line

With the text field left empty, the text part is dropped rather than left blank: the X link is just https://twitter.com/intent/tweet?url={url}, the WhatsApp message is the bare URL (https://wa.me/?text={url}), and the email link becomes mailto:?body={url} with no subject.

The X format follows the post web intent X documents, which also supports hashtags, via and related parameters you can append by hand. The email format uses the subject and body fields defined for mailto: URIs in RFC 6068; it leaves the recipient empty so the visitor's mail app asks for one.

Example: one article, every platform

For the page https://example.com/blog/tide-tables?utm_source=x&a=1 with the text Tide tables, explained:

https://twitter.com/intent/tweet?url=https%3A%2F%2Fexample.com%2Fblog%2Ftide-tables%3Futm_source%3Dx%26a%3D1&text=Tide%20tables%2C%20explained
https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fexample.com%2Fblog%2Ftide-tables%3Futm_source%3Dx%26a%3D1
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fexample.com%2Fblog%2Ftide-tables%3Futm_source%3Dx%26a%3D1
https://wa.me/?text=Tide%20tables%2C%20explained%20https%3A%2F%2Fexample.com%2Fblog%2Ftide-tables%3Futm_source%3Dx%26a%3D1
mailto:?subject=Tide%20tables%2C%20explained&body=https%3A%2F%2Fexample.com%2Fblog%2Ftide-tables%3Futm_source%3Dx%26a%3D1

Notice the page's own query string. Its ?, = and & are encoded as %3F, %3D and %26, so the platform receives utm_source=x&a=1 as part of your page URL instead of mistaking a=1 for one of its own parameters. That's the main reason to generate these links rather than type them.

Adding share buttons to a page

  1. Enter the page's canonical URL, the one you want people to land on.
  2. Choose a platform and, for X, WhatsApp or email, type the share text.
  3. Click Generate and copy the link.
  4. Wrap it in an anchor tag. The HTML link generator can do that, including the new-tab option, which suits every platform except email.
  5. Repeat for each platform you want a button for.

For WhatsApp chats with a specific phone number rather than an open share, use the dedicated WhatsApp link generator instead.

Things to know before you ship the buttons

Spaces at the ends are trimmed. Both the page URL and the share text lose leading and trailing spaces before encoding, so a stray space typed after your text doesn't end up as %20 in the link. Text that is only spaces counts as empty.

Facebook and LinkedIn take the URL only. Whatever text you type, those two links are identical with or without it. The person sharing writes their own comment.

Some links ask for a login. When we tested in October 2026, the LinkedIn link sent a signed-out browser to LinkedIn's sign-in page before the share screen. Visitors who are already signed in go straight to the composer.

Make the shared page preview well

A share link only opens the composer. What the post looks like (headline, image, description) is pulled from the page you're sharing. Facebook's sharing guide for webmasters asks for og:url, og:title, og:description and og:image on every page, and X builds its card from twitter: tags with Open Graph as a fallback. Set those up with the Open Graph generator before you put share buttons on the page, and the links will produce a proper card instead of a bare URL.

Last updated

Frequently asked questions

Why doesn't my share text appear on Facebook or LinkedIn?
The Facebook and LinkedIn links this tool builds carry only the page URL; the share text field is ignored for those two platforms. The headline, description and image in the preview come from the shared page's Open Graph tags, so set those on the page instead.
Do I need to encode the URL myself?
No. The tool percent-encodes both the URL and your text with encodeURIComponent, so characters like ?, & and spaces in your page address can't break the share link. Paste the normal address.
The X link uses twitter.com. Will it still work?
Yes. X documents its post intent at x.com/intent/tweet, and when we tested in October 2026 the twitter.com address returned a permanent redirect to that endpoint with the url and text parameters intact. You can swap the domain for x.com yourself if you prefer.
How long can the text for an X share be?
X's web intent documentation says the text, combined with any URL, hashtags or via parameters, shouldn't exceed 280 characters. Longer text still opens, but the person sharing has to edit it before they can post. The tool doesn't count characters.
Does the share link track who clicks it?
Not by itself. It's a plain URL with no tracking script, and the tool builds it in your browser without contacting any server. If you want to attribute shared traffic, add UTM parameters to your page URL before generating; they're encoded and carried through.