GameParticles
Images

How to Make a Favicon: Convert PNG to ICO and Install It

Learn how to make a favicon from a PNG or logo: convert PNG to ICO, design an icon that reads at 16 pixels, add the HTML tags and fix a favicon not updating.

Updated

To make a favicon, start with a square logo of at least 512 x 512 pixels, run it through a favicon generator to produce a favicon.ico plus PNG icons for phones, upload the files to the root of your site, and add a few link tags to the page head. The whole job takes a few minutes. The steps below cover the design, the PNG to ICO conversion, the installation and the checks.

Step 1: prepare a square source image

A favicon is square, so your source must be too. Use the highest quality version of the logo you have:

  • An SVG is ideal because it scales cleanly to every size.
  • A PNG with a transparent background works well if it is at least 512 x 512 pixels.
  • A JPG is acceptable but has no transparency, so you will get a solid background.

If the logo is a wide wordmark, do not shrink the whole thing into a square. At 16 pixels it becomes a gray smear. Use only the symbol, or the first letter. To cut a square region out of a larger image, open the Image Cropper, choose the 1:1 preset, frame the mark and download.

Step 2: design for 16 pixels

The tab icon is 16 x 16 pixels on a standard screen. That is 256 pixels in total. Designs that survive at that size follow a few rules:

  • One shape. A single letter, a simple symbol or a bold monogram. Remove taglines, thin outlines and small details.
  • Strong contrast. The icon has to stand out against both a light tab strip and a dark one. A mid-tone logo on a transparent background can vanish in one of them.
  • Fill the square. Thin margins make the icon look smaller than its neighbors. A little padding is good for home screen icons, but the tab icon should use most of its space.
  • Flat colors. Gradients and shadows turn muddy when they are scaled down.
  • Thick strokes. A line needs to be at least 2 pixels wide at 16 pixels to stay visible, which means roughly an eighth of the icon's width.

A solid background color solves the contrast problem at once. A white letter on a brand-colored square reads clearly on any browser theme.

Step 3: convert the PNG to ICO and the other sizes

Renaming logo.png to favicon.ico does not make an ICO file. The ICO format is a container with its own header that holds one or more images, and it has to be built. Some browsers tolerate a renamed PNG, but it is not reliable.

  1. Open the Favicon Generator.
  2. Drop in your PNG, JPG, WebP or SVG. Any size is accepted, though a square source of 512 pixels or more gives the best result.
  3. Look at the previews. The tool draws the icon at 16, 32, 48, 180 and 192 pixels. Switch the preview between light and dark to test contrast.
  4. Adjust the background, corner style and padding until the small previews read clearly.
  5. Download the package as a ZIP.

The settings in step 4 are:

  • Background: transparent, or a solid color you pick. Choose a color if the icon will be used on an iPhone home screen, where transparent areas are shown as black.
  • Corner style: square, rounded or circle.
  • Padding: from 0 to 25 percent, to keep the logo off the edges.

If your image is not square, the generator fits it inside the square and leaves the remaining space as background, so cropping first gives a larger, clearer icon.

The ZIP contains:

FileContents
favicon.ico16, 32 and 48 pixel images in one file
favicon-32x32.png32 pixel PNG
apple-touch-icon.png180 pixel PNG for iOS home screens
android-chrome-192x192.png192 pixel PNG for Android
android-chrome-512x512.png512 pixel PNG for Android splash screens
site.webmanifestWeb app manifest listing the two Android icons
README.txtThe HTML snippet and file list

For what each size is for and how ICO, PNG and SVG compare, see the favicon size guide.

Step 4: install the files

Upload every file from the ZIP to the root folder of your site, the same folder that serves your home page. The icon should then load at https://yoursite.com/favicon.ico.

Next, copy the HTML snippet from the generator and paste it inside the head element of your pages, or in the shared layout or template if your site has one:

  • <link rel="icon" type="image/x-icon" href="/favicon.ico">
  • <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  • <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
  • <link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
  • <link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">
  • <meta name="theme-color" content="#ffffff">

Two things to finish by hand:

  1. Open site.webmanifest in a text editor and fill in the empty name and short_name fields with your site name. These are shown under the icon when someone installs the site on Android.
  2. The snippet does not link the manifest. If you want Android and installed web apps to use it, add <link rel="manifest" href="/site.webmanifest"> to the head as well.

If the files live in a subfolder, change each href and each src in the manifest to match. If you use a site builder or CMS, you may not need the tags at all. WordPress, for example, has a Site Icon setting under Appearance, Customize, Site Identity, which takes one square image of at least 512 pixels and generates the sizes itself.

Step 5: test it

  • Open yoursite.com/favicon.ico directly. You should see the icon, not an error page.
  • Load a page and check the tab.
  • View the page source and confirm the link tags are present and the paths are correct.
  • On a phone, use Add to Home Screen and check the icon there.

When the favicon does not update

Browsers cache favicons more stubbornly than almost anything else, so an old icon can linger for days after you replace the file. Try these in order:

  1. Open the favicon URL directly and reload that page.
  2. Hard refresh the site: Ctrl+Shift+R on Windows and Linux, Cmd+Shift+R on a Mac.
  3. Open the site in a private window.
  4. Add a version to the file reference, such as href="/favicon.ico?v=2". The browser treats it as a new file.

If the icon is missing rather than stale, the cause is usually a wrong path, a file uploaded to the wrong folder, or a link tag placed outside the head.

Try it

Drop your logo into the Favicon Generator, check the 16 pixel preview, and download the ZIP with favicon.ico, the PNG icons, the manifest and the HTML snippet ready to paste.

Tools in this guide

Frequently asked questions

How do I convert a PNG to ICO?

Upload the PNG to a favicon generator and download the favicon.ico it produces. The GameParticles Favicon Generator builds an ICO containing 16, 32 and 48 pixel versions of your image. Renaming a .png file to .ico does not convert it.

What is a favicon.ico file?

It is the icon file browsers request automatically from the root of a website to show in tabs and bookmarks. The ICO format is a container that can hold the same icon at several sizes, typically 16, 32 and 48 pixels.

Where do I put the favicon.ico file?

Put it in the root folder of your site so it loads at yoursite.com/favicon.ico. Browsers look there by default. Then add link tags in the head of your pages for the PNG icons and the Apple touch icon.

Why is my new favicon not showing?

Browsers cache favicons for a long time. Open the icon URL directly and reload it, do a hard refresh, or try a private window. Also check that the file path in your link tag is correct and the file returns successfully.

More images guides

JSON Formatter
Developer · Format, validate and minify JSON with syntax highlighting.
↵
Base64 Encode / Decode
Developer · Encode text to Base64 or decode Base64 back to plain text.
↵
URL Encoder / Decoder
Developer · Encode or decode URL components and query strings.
↵
Hash Generator
Developer · Generate MD5, SHA-1, SHA-256 and SHA-512 hashes.
↵
UUID Generator
Developer · Generate UUIDs v4 (random) in bulk with one click.
↵
Regex Tester
Developer · Test regular expressions against text with live match highlighting.
↵
Word Counter
Text · Count words, characters, sentences, paragraphs and reading time.
↵
Case Converter
Text · Convert text between UPPER, lower, Title, camelCase, snake_case and more.
↵
List Sorter
Text · Sort, reverse, deduplicate and shuffle lists of text.
↵
Markdown Preview
Text · Write Markdown and see a live rendered preview side by side.
↵
Percentage Calculator
Numbers · Calculate percentages, increases, decreases and what % one number is of another.
↵
Color Converter
Colors · Convert colors between HEX, RGB, HSL and HSV instantly.
↵
Snake
Arcade · Eat food, grow longer, don't hit the walls. A timeless classic.
↵
2048
Puzzle · Slide tiles and combine them to reach the legendary 2048 tile.
↵
Word Grid
Puzzle · Guess the hidden five letter word in six tries using color clues.
↵
Sudoku
Puzzle · Fill the 9x9 grid with logic. Four difficulties from easy to expert.
↵
Minesweeper
Strategy · Use number clues to clear the minefield. Classic logic, three levels.
↵
Breakout
Arcade · Smash every brick with paddle and ball. Power-ups, combos, endless levels.
↵
Typing Practice
Casual · Build your WPM and accuracy with timed drills from 30 seconds to 5 minutes. Find your weak keys.
↵
TypeRunner
Arcade · Multiplayer typing race. Race friends by link, beat computer runners, or chase your own ghost.
↵
Typing Blocks
Arcade · Type each word before its wooden block lands. Miss, and the pile climbs toward the line.
↵
Bubble Shooter
Arcade · Aim, bank shots off the walls, and pop groups of three or more bubbles.
↵
Road Rush
Arcade · Race seven rivals through traffic and punch your way to the front.
↵