Preload, Preconnect and Resource Hint Builder

List your critical fonts, images and third-party origins, get ordered link tags, Link headers or React code, and see which hints waste bandwidth.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Set the page URL

    Enter the page's address so hints to its own origin can be flagged.

  2. 2
    Add hints

    Use quick-add buttons such as Google Fonts or LCP image, or import from pasted HTML.

  3. 3
    Fill in each row

    Choose rel, type the URL, and adjust as, type, crossorigin and fetchpriority.

  4. 4
    Read the checks

    Fix errors first, then trim hints flagged as overuse.

  5. 5
    Pick an output

    Switch between HTML head, Link header, Nginx and React code.

  6. 6
    Copy or download

    Paste the result high in your head or into your server config.

About this tool

Resource hints tell the browser about work it will need to do before the parser finds out by itself. A preconnect opens the DNS, TCP and TLS connection to another origin early, dns-prefetch does only the DNS lookup, preload fetches a file the current page needs at high priority, modulepreload does the same for JavaScript modules and also parses them, and prefetch fetches something for the next page at idle priority. Used well, they cut hundreds of milliseconds from Largest Contentful Paint. Used badly, they do the opposite: a dozen preloads all fight for the same bandwidth, a font preload without the crossorigin attribute is downloaded twice, and a preconnect to an origin that is not used within ten seconds is closed again for nothing. This builder keeps a list of hints, writes each tag with the attribute values the specification expects, orders them the way they should sit in the head, and checks the list against the common mistakes before you ship it.

What the builder writes

Each row is one hint. Choose the rel value and type the URL or origin; the as and type fields fill themselves from the file extension, so a .woff2 file becomes as=font with type font/woff2 and an .avif image becomes as=image with type image/avif. Fonts and modulepreload get crossorigin automatically because browsers always request fonts in CORS mode, and a preload that does not match the real request is wasted. Image preloads accept imagesrcset and imagesizes so a responsive hero image is preloaded in the right width instead of the largest one.

Four output formats

The HTML head output is sorted: preconnect, then dns-prefetch, then preload, modulepreload and prefetch. The Link header output is the same list as an HTTP header, which you can also send in a 103 Early Hints response so the browser starts fetching while your server is still rendering. The Nginx output wraps each entry in add_header. The React output uses the preconnect, prefetchDNS, preload and preinit functions from react-dom that Next.js App Router and React 19 provide.

The checks

More than four preconnects, more than six preloads and more than two fetchpriority=high hints are flagged as overuse. Each row is also checked on its own: a preload without as, a preconnect that contains a path, a hint to the page's own origin, a font preloaded with credentials, a .js file preloaded as a style, and a module preloaded with the classic rel. A preload on a third-party origin gets a notice that a matching preconnect lets the connection start even earlier.

Import from HTML

Paste the head of an existing page. The builder lists the hints already present and proposes new ones: third-party origins used by stylesheets, scripts, images and iframes become preconnects (the first three) or dns-prefetch, an image marked fetchpriority=high becomes an image preload, and a woff2 file in an inline @font-face becomes a font preload.

Limits

The checks read the list, not your live page, so the tool does not measure whether a hint actually improved loading; confirm the effect with Lighthouse or the Network panel. It does not fetch the URLs you enter, and it cannot know which image is your LCP element unless you mark it.

Worked example

A shop page loads Inter from Google Fonts, a 1200 px AVIF hero and Google Tag Manager. The import finds three origins and suggests preconnects to fonts.googleapis.com and fonts.gstatic.com (with crossorigin) and a dns-prefetch for googletagmanager.com, because analytics is not needed for the first paint. Adding the hero as an image preload with fetchpriority=high and imagesrcset of 600w and 1200w gives five tags. The checker shows no errors and one notice: add type="font/woff2" to the self-hosted font. In the owner's Lighthouse run, LCP fell from 3.1 s to 2.4 s on a throttled mobile profile, most of it from the hero no longer waiting for the CSS.

Quick facts

Frequently asked questions

What is the difference between preconnect and dns-prefetch?

dns-prefetch only resolves the domain name. preconnect also opens the TCP connection and does the TLS handshake, which saves more time but costs a socket and some CPU. Use preconnect for the two or three origins needed in the first seconds and dns-prefetch for the rest.

Why does a font preload need crossorigin?

Browsers fetch fonts in anonymous CORS mode even from your own domain. A preload without crossorigin is made in a different mode, does not match the later request and the font downloads a second time.

Should I preload my LCP image or use fetchpriority?

If the image tag is in the HTML, fetchpriority="high" on the img is often enough. Preload helps when the image is discovered late, for example as a CSS background or when it is inserted by JavaScript.

Can I send hints as HTTP headers?

Yes. Copy the Link header output into your server or CDN configuration. Sending it with 103 Early Hints lets the browser start before the HTML arrives. dns-prefetch is left out of the header output on purpose.

How many preloads are too many?

There is no hard limit, but every preload competes at high priority. As a rule of thumb keep it to the LCP image, one or two critical fonts and any CSS that is discovered late, which is usually under six.

Does the tool contact the URLs I enter?

No. It only builds text. Your list is kept as a draft in this browser so a reload keeps your work, and undo covers every change.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages