Letter Spiral
Generate beautiful spiral text art from any phrase. Customize spacing, size, direction, colors, and export as PNG image.
About
Placing text along a spiral curve requires solving an arc-length parameterization problem on the Archimedean spiral defined by r = a + bθ. Uniform character distribution demands numerical integration of the arc-length differential, not naive angle stepping. Naive angle increments produce text that clusters near the center and stretches at the periphery. This tool computes per-character placement by inverting the cumulative arc-length function, then rotates each glyph tangent to the curve. Approximation error stays below 0.5px for typical inputs.
The generator handles Unicode, adjusts for variable glyph widths via Canvas measureText, and supports both clockwise and counter-clockwise winding. Export resolution matches the canvas at 1× device pixel ratio. For print use, increase font size above 24px to maintain legibility after rasterization. Note: extremely long strings with tight spacing may overlap near the spiral origin where curvature is highest.
Formulas
The Archimedean spiral in polar coordinates:
Converting to Cartesian coordinates for canvas placement:
The arc-length differential for the Archimedean spiral:
To place the k-th character, we find θk such that the cumulative arc length equals the sum of preceding glyph widths plus gaps:
The tangent angle at each point for glyph rotation:
Where a is the initial radius, b is the expansion rate per radian, θ is the angle parameter, wi is the measured width of character i, g is the extra character gap, and ψ is the tangent angle used to rotate each glyph.
Reference Data
| Parameter | Symbol | Default | Range | Effect |
|---|---|---|---|---|
| Initial radius | a | 20px | 0 - 100 | Gap at spiral center |
| Expansion rate | b | 8px/rad | 2 - 30 | Distance between successive turns |
| Character gap | g | 4px | 0 - 20 | Extra spacing between glyphs |
| Font size | - | 18px | 8 - 72 | Glyph height |
| Max turns | N | 10 | 1 - 30 | How many revolutions the spiral makes |
| Direction | - | CW | CW / CCW | Clockwise or counter-clockwise winding |
| Start angle | θ0 | 0° | 0 - 360 | Rotation offset of entire spiral |
| Repeat text | - | On | On / Off | Tile text to fill all available arc length |
| Text color | - | #2D3748 | Any | Glyph fill color |
| Background | - | #FFFFFF | Any / Transparent | Canvas background |
| Canvas size | - | 600×600px | 300 - 1200 | Output image dimensions |
| Font family | - | Sans-serif | 5 options | Typeface selection |