Zahid Awais Get a free audit

Free resource hints generator

List the origins and files your page needs early and get clean preconnect, dns-prefetch, preload, prefetch and modulepreload tags, with the mistakes that waste them flagged.

By Zahid Awais · Technical SEO tools · Free, private, no sign-up

Add a hint

Options: as=, type=, crossorigin (or crossorigin=use-credentials), fetchpriority=, imagesrcset=, imagesizes=, media=. Quote values that contain spaces. Nothing leaves your browser.

Result
0Link tags
0Preconnects
0Warnings
    Resource Hints Generator: what it does and an example result

    The free preload and preconnect generator turns a short list of origins and files into correct resource hint tags for the head of your page. It checks each hint against the rules browsers follow, fixes the safe mistakes and also writes the HTTP Link header version.

    Quick answer

    Resource hints are link tags that tell the browser what to fetch or connect to early. Use preconnect for the one or two third-party origins the page needs first, dns-prefetch for less important ones, and preload for a critical file the browser finds late, such as a font or the LCP image. Always set as on preload.

    What are resource hints?

    Resource hints are values of the rel attribute on a <link> element that let you start network work before the browser discovers it on its own. preconnect opens a connection to another origin, dns-prefetch only looks up its DNS, preload downloads a file the current page needs, prefetch fetches something for a likely next page at low priority, and modulepreload fetches and compiles a JavaScript module.

    Each one has rules that are easy to break. web.dev's guide to preloading critical assets says "Fonts preloaded without the crossorigin attribute will be fetched twice!", and a preload with no as value is treated like a plain fetch request. This generator catches those problems before the tags reach your site, and it can also read link tags you paste from an existing page.

    How do you use the Resource Hints Generator?

    How to use the Resource Hints Generator: enter details, see the result and copy it
    Real screenshot of the Resource Hints Generator with the example input from this page.
    1. Write one hint per line: the hint name, the URL or origin, then options such as as=font or crossorigin. You can also paste link tags copied from your page source.
    2. Or use the Add a hint box: pick the hint, type the URL, choose as, fetchpriority and crossorigin, and press Add line.
    3. Enter your own site origin so the tool can warn about preconnects to your own domain, which do nothing.
    4. Keep auto-fix on to add a missing as value, crossorigin and font type from the file extension, and read each Fixed and Warning line.
    5. Copy the tags into the head of your page, as early as possible, or copy the Link header for your server or CDN.

    When should you use preconnect instead of preload?

    Use preconnect when you know which other origin the page needs but not the exact file, and preload when you know the exact file and the browser would find it late. A Google Fonts stylesheet is a typical case for preconnect to fonts.gstatic.com, because the font file names are only known after the CSS loads. A hero image set as a CSS background, or a font referenced deep inside a stylesheet, is a typical case for preload. web.dev notes in its preconnect guide that "the browser closes any connection that isn't used within 10 seconds", so only preconnect to origins used straight away.

    How many preconnect hints are too many?

    Keep preconnect to about 2 origins. Lighthouse's preconnect audit warns when it finds "More than 2" preconnect links and says they "should be used sparingly and only to the most important origins". web.dev adds: "Be careful not to preconnect to too many origins, as this may cause bandwidth contention." For other third-party origins, use dns-prefetch, which only resolves the domain name and costs far less. This tool counts your preconnects and warns from the third one.

    Do resource hints help SEO?

    Not directly. Resource hints change how fast a page loads for real visitors, which can improve Largest Contentful Paint, one of the Core Web Vitals. Google's Core Web Vitals documentation asks site owners to "strive to have LCP occur within the first 2.5 seconds" and says good vitals align "with what our core ranking systems seek to reward". A wrong hint can also make LCP worse by stealing bandwidth from the files that matter, so test before and after with real data.

    Quick reference: which hint does what

    HintWhat it doesKey attributesCommon mistake
    preconnectDNS, TCP and TLS to another originhref (origin), crossorigin for fontsToo many origins, or missing crossorigin
    dns-prefetchDNS lookup onlyhref (origin)Combined with preconnect in one tag
    preloadDownloads a file the current page needsas, type, crossorigin, fetchpriorityNo as value, or font without crossorigin
    preload as=imageDownloads the right responsive imageimagesrcset, imagesizesimagesizes not matching the img
    prefetchLow priority fetch for a next pagehrefUsing it for the current page
    modulepreloadFetches and compiles a JS modulehref, crossorigin if neededExpecting all dependencies to load

    Worked example

    Example

    Example: the default list has 8 hints for a site at https://www.example.com. The tool outputs 11 link tags, because auto-fix adds a dns-prefetch fallback after each of the 3 preconnects. The font preload has as="font" but no crossorigin or type, so the tool adds crossorigin and type="font/woff2", shown as 2 auto-fixes. The result shows 1 warning: 3 preconnects is more than the 2 Lighthouse accepts. The Link header holds 4 entries: the 3 preconnects and the font preload. The dns-prefetch tags, the responsive hero preload, the modulepreload and the prefetch stay in the HTML only.

    Learn more

    Frequently asked questions

    Where do I put resource hint tags?

    Put them in the head, as early as possible, before stylesheets and scripts. The browser can only act on a hint once it has read it, so a preload placed at the bottom of a long head loses most of its value.

    Can I use preconnect and dns-prefetch together?

    Yes, as separate tags. web.dev says dns-prefetch can serve as a fallback for browsers without preconnect support, and warns that putting both values in one tag causes a Safari bug where preconnect gets cancelled. This tool writes them as two tags.

    Why does a font preload need crossorigin on my own domain?

    Fonts are always fetched in CORS mode. MDN says the crossorigin attribute must match the resource's CORS mode "even when the fetch is not cross-origin". Without it the preload does not match the real request, and web.dev says the font is fetched twice.

    What does fetchpriority do on a preload?

    It raises or lowers the priority of that request compared with others of the same type. web.dev calls fetchpriority "a hint, not a directive". Use high for the LCP image and low for preloads that should not compete with critical files.

    Should I prefetch the next page?

    Prefetch fetches a file for a likely next navigation at low priority and keeps it in the HTTP cache. For whole documents, MDN now advises the Speculation Rules API where it is supported, and prefetch for subresources of same-site pages.

    How do I check that a hint is working?

    Open Chrome DevTools, reload the page and look at the Network panel: preloaded files should start early. Chrome logs a console warning when a preloaded file is not used soon after load, which usually means the URL or as value does not match.

    Sources

    Checked 23 Oct 2026. Facts checked against these official pages. Read how I check facts in my editorial policy.

    Related free tools

    All free tools

    Core Web Vitals Checker

    A Core Web Vitals checker is a tool that compares your measured Largest Contentful Paint, Interaction to Next…

    Srcset Generator

    Builds srcset, sizes, width, height and picture sources, and previews the file a browser picks.

    HTML Minifier

    An HTML minifier is a tool that rewrites markup into fewer bytes without changing what the browser renders.…

    Want a full audit instead?

    Send your website and I will check it for you, free.

    Get my free audit
    Chat on WhatsApp
    Free updates

    Get new tools, guides and coupons first

    One short email when something new goes live: articles, free SEO tools, package updates, discounts and price alerts. No spam, unsubscribe in one click.