Dynamic SVG Icons Generator

How to generate SVGs

Use the following URL format:

/generate_svg?font_size=[integer]&text=[string]&text_length=[integer]&fill_color=[color]&text_color=[color]&shape=[circle/square/square_rounded/diamond]

Example: /generate_svg?font_size=30&text=Hello+World&text_length=5&fill_color=%23ff0000&text_color=%23ffffff&shape=circle

This request would generate an SVG image with the text "HW" (shortened from "Hello World") in a font size of 30, with a red fill color and white text color, in a circle shape.

Generated SVG

If you don't specify a fill_color or text_color, the script will generate a different random one that has sufficient contrast with the other color for every request.

If you omit both colors, the script will generate two different random colors with enough contrast for every request.