FavURL Logo
FeaturesBlogAboutPricingLoginSign up
FavURL

Create, share, and track links. The link shortening platform creators deserve.

Company

  • About
  • Blog
  • Affiliate Program
  • Contact

Resources

  • Help Center
  • Share Button Widget

Product

  • Features
  • Pricing
  • Dashboard

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

Stay Updated

Get feature updates and creator success tips delivered to your inbox.

© 2026 FavURL. All rights reserved.
Made with by VistaCodeLab
Website Widget

Add a "Share to FavURL" Button

Let your visitors save and share your pages on FavURL with a single click. Copy the snippet below and paste it anywhere in your site's HTML — no framework or build step needed.

Choose a style

Preview

Preview on light background
🔗 Share to FavURL

HTML snippet

<!-- Share to FavURL | https://fav-url.com/tools/embed-button -->
<a href="https://fav-url.com"
   onclick="this.href='https://fav-url.com?url='+encodeURIComponent(window.location.href);"
   target="_blank"
   rel="noopener noreferrer"
   style="display:inline-flex;align-items:center;gap:6px;background-color:#0ea5e9;color:#ffffff;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:14px;font-weight:500;padding:8px 16px;border-radius:8px;text-decoration:none;cursor:pointer;">
  🔗 Share to FavURL
</a>

The onclick handler dynamically sets the href to include the visitor's current page URL before the browser follows the link. No external scripts or CDN required.

How to set it up

1
Pick a style
Choose the button variant that best fits your website's design — blue button, dark button, or a plain text link.
2
Copy the snippet
Click the "Copy" button to copy the HTML snippet to your clipboard.
3
Paste into your page
Paste the snippet anywhere in your page's HTML — e.g. below an article, in a sidebar, or in your site footer.
4
That's it!
When a visitor clicks the link, it opens FavURL in a new tab with the current page URL pre-filled, ready to be saved and shared.
How it works

When a visitor clicks the button, the onclick handler reads window.location.href — the exact URL of the page the visitor is currently on — and appends it to the FavURL base URL as a ?url= query parameter.

FavURL then opens with that URL pre-filled in the Create Link dialog, so logged-in users can instantly save and shorten it. Visitors who are not yet signed in will be prompted to create a free account first.

https://fav-url.com?url=https://your-website.com/your-article

Frequently asked questions

Does it require JavaScript?
Yes — the snippet uses a small inline onclick handler to capture the current page URL at click time. The button still renders and links to FavURL without JS, but the URL will not be pre-filled.
Can I change the button text or colours?
Absolutely. The styles are plain inline CSS — edit the style attribute to use your brand colours, font, or size. The only functional parts are the href, onclick handler, target, and rel attributes.
Can I add it to a CMS like WordPress or Webflow?
Yes. Paste the snippet into any HTML/embed block in your CMS editor, or add it to your theme's footer template.
Is there a tracking or analytics benefit?
When a visitor creates a link through the button, it becomes a FavURL short link. When a user saves it — they can track clicks and analytics directly in their FavURL dashboard.

Don't have a FavURL account yet?