Skip to content
UniKit

Slogan avatar generator

Lay a slogan out into a square avatar: automatic line wrapping, optional stroke and background gradient, square, rounded or circle shapes, and both the SVG source and a base64 data URI as output.

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

Slogan

Preview

Enter a slogan to generate the avatar

Layout and SVG source

Wrapping estimates one full-width unit per CJK character and half a unit per Latin character — no font-measurement API is used. Output is the SVG plus a base64 data URI

What this tool does

  • Turn a slogan into an avatar: enter “Make it real” and get an automatic two-line layout with a 512 × 512 SVG plus a data URI.
  • Change the shape and colours: square, rounded or circle, a background with an optional gradient end colour, plus separate text colour and stroke.
  • Fine-tune the layout: set the maximum full-width characters per line or the font size by hand to squeeze or enlarge the text, with a live preview.

Example

Input

hello

Output

Slogan: hello
Canvas 512 × 512 · shape rounded · font size 174.08px · line height 208.9px
Split into 2 lines (about 2 full-width characters each) · estimated text width 287.23px · block height 417.8px
  1. hel
  2. lo

SVG source:
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img">
  <defs>
    <clipPath id="shape"><rect x="0" y="0" width="512" height="512" rx="81.92" ry="81.92" /></clipPath>
  </defs>
  <g clip-path="url(#shape)">
    <rect x="0" y="0" width="512" height="512" fill="#4D6BFE" />
    <g fill="#FFFFFF" font-family="system-ui, -apple-system, 'Noto Sans SC', sans-serif" font-weight="700" dominant-baseline="alphabetic">
    <text x="256" y="210.04" text-anchor="middle" font-size="174.08">hel</text>
    <text x="256" y="418.94" text-anchor="middle" font-size="174.08">lo</text>
    </g>
  </g>
</svg>

data URI (ready for <img src>):
data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgcm9sZT0iaW1nIj4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0ic2hhcGUiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiByeD0iODEuOTIiIHJ5PSI4MS45MiIgLz48L2NsaXBQYXRoPgogIDwvZGVmcz4KICA8ZyBjbGlwLXBhdGg9InVybCgjc2hhcGUpIj4KICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSIjNEQ2QkZFIiAvPgogICAgPGcgZmlsbD0iI0ZGRkZGRiIgZm9udC1mYW1pbHk9InN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ05vdG8gU2FucyBTQycsIHNhbnMtc2VyaWYiIGZvbnQtd2VpZ2h0PSI3MDAiIGRvbWluYW50LWJhc2VsaW5lPSJhbHBoYWJldGljIj4KICAgIDx0ZXh0IHg9IjI1NiIgeT0iMjEwLjA0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjE3NC4wOCI+aGVsPC90ZXh0PgogICAgPHRleHQgeD0iMjU2IiB5PSI0MTguOTQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTc0LjA4Ij5sbzwvdGV4dD4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPg==

The real output for hello with the default options (512 × 512, rounded, #4d6bfe background, white text).

Frequently asked questions

How are the line breaks and font size computed?

Wrapping uses no font-measurement API at all: CJK and full-width characters count as one full-width unit and Latin or half-width characters as 0.55, and lines are cut at that unit budget (breaking at spaces first and between Chinese characters otherwise). The default font size is the smaller of 34% of the canvas and the size at which the widest line just fits, which is why short English slogans get a much larger size than Chinese ones.

Can the generated SVG be used directly?

Yes. The result contains both the SVG source and a base64 data URI: save the source as a .svg file or paste it into a page, and use the data URI in an <img src> or CSS background-image. No external font file is needed — the font stack is system-ui, Noto Sans SC and friends.

Is there a built-in slogan library?

No. The tool only lays out the text you type, ships no slogan or copy library and never invents a sentence, so nothing can come from an unknown source. The text is entirely yours and may be up to 200 characters.

Can the preview differ from the final render?

Slightly: the preview uses the system fonts on your device, and glyph widths differ between devices, while the wrap points and font size are estimated from full-width units. For an exact match, use the exported SVG in the final page or specify the characters per line and the font size by hand.

Keywords:avatar generatorslogan avatar

Related tools