Generate a package

curl -X POST https://favicon.zip/api/generate \
  -H 'content-type: application/json' \
  -d '{"text": "F", "font": "Inter", "background": "#daff24", "radius": 0.25, "padding": 0.1}' \
  -o favicon.zip

The response is application/zip: favicon.ico, icon.svg, favicon-96x96.png, apple-touch-icon.png, the PWA icons, manifest.webmanifest, and a favicon-setup.md with the install snippet for your framework.

Request fields

fieldtypenotes
svgstringSVG markup, up to 512 kB. Sanitized before use. Provide exactly one of svg, text, emoji.
textstring1–4 characters, converted to vector paths.
emojistringA single emoji, drawn with Twemoji vector artwork.
fontstringText mode typeface: any Google Fonts family name, or a bundled id such as inter-800. Defaults to Inter.
text_colorhexGlyph color in text mode.
background"none" · hex · gradientA gradient is {"from": "#hex", "to": "#hex", "angle": 135}.
paddingnumber-1 to 0.35 of the icon size. Negative values zoom in.
radiusnumber0 is square, about 0.25 is rounded, 1 is a circle.
offset_x, offset_ynumber-0.25 to 0.25, nudges the mark.
dark_background, dark_text_colorhexMakes icon.svg adapt to dark mode.
frameworkstringhtml, nextjs, vite, astro, rails or wordpress. Tailors favicon-setup.md.
app_name, short_name, theme_colorstringWritten into the manifest.
pwa, google_96, ico_48booleanDefault true. Turn off the PWA icons, the 96px Google icon, or the 48px ICO layer.
env_variants, monochrome, dynamic_modulebooleanDefault false. Adds badged dev/staging/preview copies, a monochrome manifest icon, or favicon-dynamic.js.

Every spec also works as a GET request, with the JSON encoded as base64url in spec. The result is cacheable and safe to hand to a user or put in a README.

SPEC=$(printf '%s' '{"text":"F","background":"#17171a","text_color":"#daff24","radius":0.25}' | base64 | tr '+/' '-_' | tr -d '=\n')
curl -o favicon.zip "https://favicon.zip/api/generate?spec=$SPEC"

Other endpoints

endpointreturns
GET /api/check?url=example.comA JSON favicon report, the same one the checker shows.
GET /api/fetch-icon?url=example.comThe best icon the site currently ships, as bytes. The x-icon-source header says which file was chosen.

Errors and limits

  • Validation problems return 400 with {"error": "..."} explaining the field.
  • Request bodies are capped at 768 kB and return 413 past that.
  • All endpoints send access-control-allow-origin: *, so browsers can call them directly.
  • The API is free and unauthenticated. Please cache results rather than regenerating the same package on every build.

For agents

Coding agents that speak MCP should use the MCP server instead: it returns the download link, the head snippet, and a preview image in one call. Agents without MCP can read /llms.txt.

Questions

Do I need an API key?

No. The API is free and needs no key or account.

Can I upload a PNG or JPEG?

The API takes SVG, text or an emoji. For raster images, use the editor, which runs in your browser and handles PNG, JPEG and WebP.

Is uploaded SVG safe?

Every SVG goes through an allowlist sanitizer first. Scripts, event handlers, external references and remote CSS imports are removed before anything is rendered.