UTILS.
Private by default
rel

Canonical Tag Generator

Generate a canonical link tag and og:url meta from a page URL.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Builds the canonical link tag and matching og:url meta for any page URL, helping avoid duplicate-content issues. Generated in your browser.

Enter a full address including the scheme. The tool runs it through the browser's URL parser and uses the normalized result: the hostname is lowercased, a bare domain gets a trailing slash, a default port such as :443 is removed, spaces are percent-encoded and dot segments are resolved. Anything the parser rejects, such as an address without https://, shows an error.

The output is a link rel="canonical" tag and a meta property="og:url" tag with the same address, HTML-escaped so an ampersand becomes &. Query strings and #fragments are kept as parsed, so remove them from the input if unwanted. The tool only builds text; it does not fetch the page or check that the address exists.

Frequently asked questions

What is a canonical tag?
A link tag that tells search engines which URL is the preferred version of a page when similar URLs exist.
Where does it go?
Paste the tag inside the <head> of your page, pointing to the page's own canonical address.
Does it remove tracking parameters or fragments?
No. The query string and fragment stay as parsed; delete what you do not want from the input.
Why does example.com give an error?
A scheme is required. Type https://example.com, because the URL parser cannot read it without one.

More tools