Favicon Setup for Next.js — Complete Guide for App Router and Pages Router
Try the workflow
Generate your Next.js favicon files
FreeFaviconGen creates all required favicon sizes for Next.js including 16x16, 32x32, 180x180, 192x192, and 512x512. Download the full pack and follow this guide.
App Router: The favicon.ico Approach
In Next.js App Router (Next.js 13+), the simplest approach is placing a `favicon.ico` file in your `app/` directory. Next.js automatically serves it at `/favicon.ico` and adds the correct link tag to the HTML head. For this to work, the file must be in the `app/` folder, not `public/`. For additional PNG sizes and the Apple Touch Icon, use the metadata icons API or add link tags in your root `layout.tsx`.
App Router: Metadata API for All Sizes
For full favicon coverage in App Router, use the metadata icons field in your root `layout.tsx`: export const metadata = { icons: { icon: [{ url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' }, { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' }], apple: [{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' }] } }. Place all favicon files in your `public/` directory. Generate them with FreeFaviconGen first.
Pages Router: Direct Head Tag Approach
In Next.js Pages Router, add favicon link tags to `_document.tsx` or use the `<Head>` component from `next/head` in `_app.tsx`. Copy the HTML snippet from FreeFaviconGen's Code Snippets section directly into your `<Head>` component. Place all favicon files in the `public/` directory — they'll be served from the root URL automatically.
PWA Support in Next.js
For PWA support, create a `manifest.json` (or `site.webmanifest`) file in your `public/` directory and reference it in your HTML head or metadata. FreeFaviconGen generates a complete manifest.json snippet in the Code Snippets section. Customize the `name`, `short_name`, `theme_color`, and `background_color` values to match your app, then save the file as `public/site.webmanifest`.
The Real Reason People Search For Favicon Setup for Next.js
Most people search for favicon setup for next.js — complete guide for app router and pages router because a small task is blocking a bigger outcome: sending a file, checking a number, cleaning up content, preparing a school or office deliverable, or fixing something quickly on mobile. The useful answer is not theory alone. The useful answer is a clear path from the problem to a working result. After reading the main idea, use Free Favicon Gen with your own input so the article becomes a finished task, not just saved advice.
A 60-Second Workflow You Can Try Now
Start with one realistic example instead of an abstract sample. Confirm the input labels, enter the values or upload the file, review the preview or result, then use copy, export, download, reset, or share only after the output makes sense. This fast workflow is what turns search traffic into real product usage: the reader arrives with a task, sees the exact next step, and can complete it immediately in the browser.
Where This Saves Time In Real Life
Free Favicon Gen helps when the alternative is repetitive manual work, a spreadsheet formula you do not fully trust, or installing software for a one-time task. Students can check assignments faster, office users can finish routine work without context switching, creators can prepare assets quickly, and mobile users can complete a job without waiting to get back to a desktop. The benefit is practical: fewer steps between the question and the usable output.
Mistakes That Make Good Tools Look Wrong
Before trusting the output, check whether the tool expects plain text, numbers, dates, units, files, or a specific format. Recalculate once after changing the main input, compare the result with a simple estimate, and read the labels around the output. Many bad results come from pasted values in the wrong field, hidden units, stale browser state, or rounding too early. The tool should make the work easier, but the final check still belongs to the user.
The Best Next Step
If this article matched your problem, do not leave the idea in the article. Open Free Favicon Gen, try the workflow with one real example, and keep the result only after it passes your own quick check. That is the standard every YantraKosha blog should follow: a useful hook, a real use case, a clear workflow, and a relevant next action.
Quick Reference For Repeat Use
Bookmark Free Favicon Gen so the next time the same task comes up you do not have to search again. Save the input format that worked for you, keep one tested example nearby, and treat the tool as a small reliable step inside your larger workflow. Public tools work best when they fit into a habit, not when they are rediscovered every week from a fresh search result.
Frequently Asked Questions
Try the workflow
Generate your Next.js favicon files
FreeFaviconGen creates all required favicon sizes for Next.js including 16x16, 32x32, 180x180, 192x192, and 512x512. Download the full pack and follow this guide.