✳tools.stBrowse tools
◈ Processed on your device
◈

Responsive image srcset builder

Build srcset markup from a URL template containing {width}.

Free

Build srcset markup from a URL template containing {width}. Provide a URL template and width list to create img markup with width descriptors and lazy loading. Widths are deduplicated and sorted, with the largest URL used as src.

◈ Local processingFree

How to use

  1. Enter your text, values, or image.
  2. Adjust the options and run the tool.
  3. Copy or download your result.

Worked example

Example input

URL template with {width}: /img-{width}.webp
Widths, comma-separated: 320,640
Alternative text: A&B

Example result

<img src="/img-640.webp" srcset="/img-320.webp 320w, /img-640.webp 640w" sizes="100vw" alt="A&amp;B" loading="lazy">

Limitations and details

The tool does not resize images or confirm URLs exist; generated sizes="100vw" may need adjustment to match the actual layout.

Inputs and options

URL template with {width}
Text
Widths, comma-separated
Text
Alternative text
Text

Frequently asked questions

Is this tool free and private?

Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.

Related tools