Skip to content
UniKit

Text to icon image

Draws 1–6 characters (A–Z, 0–9, + - . space) pixel by pixel into an RGBA icon (128 × 128 by default) from a 5×7 bitmap font, with adjustable size, corner radius, glyph colour and background colour. The page previews it on a canvas and exports a PNG (such as icon-a1-128.png), reporting the glyph / background / transparent pixel counts and the file size. Because no font is involved, every device renders it identically, and unsupported glyphs such as Chinese characters raise an explicit error.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Generated icon

Change the text or an option to generate the icon.

16%

Generated result

The real size, pixel breakdown and byte count of this run.

Type the text to generate.

What this tool does

  • Make a favicon or app icon for an internal project: type short text such as A1 and get a 128×128 PNG without depending on installed fonts.
  • Generate bitmap icons as placeholders or test fixtures: set the size and colours, and the same text yields identical pixels on every device, which makes comparisons easy.
  • Inline the icon in HTML: tick the base64 option and paste the data: URL into <link rel="icon"> or a CSS background to save a request.
  • Dial in the look you want: size, radius (as a percentage of the size), glyph colour and background colour are all real parameters — the preview and the stats update immediately, and the download arrives as icon-a1-128.png.

Example

Input

Text A1, size 128 px, radius 16%, glyph #ffffff, background #6366f1 (defaults)

Output

Text: A1
Canvas: 128 × 128 px (16384 pixels)
Glyphs: 2 glyph(s) · bitmap scale 8 px
Radius: 20 px (16% of the size)
Colours: glyph #ffffff · background #6366f1
Glyph pixels: 1792 / 16384 px (10.94%)
Background pixels: 14486 / 16384 px (88.42%)
Transparent pixels: 106 / 16384 px (0.65%)
RGBA data: 65536 B (128 × 128 × 4)
Built-in PNG encoder: 403 B (built-in encoder — always identical for the same input)
base64: omitted
Download file name: icon-a1-128.png

Those are the numbers the page prints directly. Set the radius to 0 and the transparent pixels become 0; set the size to 256 and the bitmap scale becomes 16 px with 9728 glyph pixels; tick base64 and the full report gains a complete data:image/png;base64,… line.

Frequently asked questions

Why does it not depend on fonts?

The icon is computed dot by dot from a 5×7 bitmap and then compressed by a pure-JS PNG encoder (a 128×128 RGBA buffer is 65536 bytes). No system font is used, nothing is uploaded and there is no canvas rendering involved, so the same text produces byte-identical images across systems and browsers.

Which characters are supported?

The built-in bitmap covers A–Z, 0–9 and + - . space — 40 glyphs in total. Lowercase letters are upper-cased, so a1 and A1 produce the same icon. Characters with no bitmap data, such as Chinese ideographs, kana, emoji or #, are rejected with an explicit message instead of being drawn as boxes.

How are size, radius and colours decided?

The size defaults to 128 and accepts 8–1024 pixels. The radius is a percentage of the size (0–50), defaulting to 16% — round(128 × 0.16) = 20 px — and 0 gives square corners. Glyphs are scaled by an integer factor so they fill at most 72% of the width and are centred (8 px per dot for two glyphs at 128 px). The defaults are white glyphs on #6366f1, and colours accept 3/4/6/8-digit hex.

What are the three pixel counts in the stats?

The page really counts every pixel: glyph pixels (equal to the glyph colour), background pixels (equal to the background colour) and transparent pixels (outside the rounded corners, alpha = 0). The three add up to the total — 1792 + 14486 + 106 = 16384 by default — so changing a colour or the radius moves those numbers immediately.

Why can the download differ from the “built-in PNG encoder” size?

The preview and download go through the browser’s canvas PNG encoder, whose compression differs from the built-in pure-JS encoder (zlib level 9), so the byte count can vary slightly — the pixels are identical. The built-in encoder row is the deterministic size of the same pixels, useful for checks and snapshots.

Is the generated image uploaded?

No. Bitmap rendering, PNG encoding, base64 conversion and the download all run in your browser with no network requests and nothing written to local storage.

Keywords:Text to icon imagestr2iconofflinedeterministic

Related tools