Image URL Formatter & Embed Code Generator
Turn an existing image URL into clean HTML, Markdown, and BBCode snippets — no re-upload needed.
Have an image file instead of a URL? Upload it to get a hosted CDN link, then paste that link here to format it.
Upload & host with Image to URLFormat image URLs
Paste one URL per line. Snippets update as you type.
Blank lines are ignored. Every line must be a full http:// or https:// URL.
URL formatting, not hosting
- →Paste image URLs you already have — one per line
- →Generate Direct URL, Markdown, HTML, and BBCode snippets
- →Add alt text, dimensions, lazy loading, or tracking cleanup
Need to host an image first? Use the Image to URL tool to upload one, then paste the hosted link here.
How to Format Image URLs into Embed Code
- 1
Paste one URL per line
Use the image address from your CDN, CMS, or any public host. Blank lines are ignored.
- 2
Set optional attributes
Add alt text, width, height, loading="lazy", decoding="async", or remove tracking parameters.
- 3
Pick a format
Switch between Direct URL, Markdown, HTML, and BBCode. Output updates as you type.
- 4
Copy the batch
Copy every snippet at once, or copy a single line from the output if you are editing one embed.
Features of the Image Embed Generator
Batch URL formatting
Paste one URL per line and get a snippet for every image in one pass.
Optional HTML attributes
Add width, height, loading="lazy", and decoding="async" only when you need them.
Four output formats
Generate a direct URL, Markdown, an HTML img tag, and BBCode from the same batch.
Tracking parameter cleanup
Optionally drop utm_*, fbclid, gclid, and similar campaign tags before formatting.
Live output
Snippets update as you type, and invalid lines are called out by number.
Optional live preview
Load the first remote image only when you ask; formatting itself only builds text.
Copy the whole batch
One copy button copies every line in the selected format.
Works with any public host
CDN links, GitHub raw URLs, S3 objects, CMS media libraries, and forum attachments work as long as the URL is public.
Supported Link Sources & Output Examples
Most public image URLs work. These are the sources developers paste most often, with the URL shape that formats cleanly. If you still need to upload a file, use Image to URL first.
| Source | Example URL | Keep in mind |
|---|---|---|
| Cloudflare R2 / custom CDN | https://cdn.example.com/uploads/photo.jpg | Use the public object URL or your custom CDN domain; avoid signed download links. |
| Amazon S3 / CloudFront | https://d111111abcdef8.cloudfront.net/photo.jpg | The object or distribution URL must be public. Presigned URLs expire. |
| GitHub raw | https://raw.githubusercontent.com/user/repo/main/image.png | Use the raw file URL, not the GitHub file page. |
| GitHub user attachments | https://github.com/user-attachments/assets/… | Public attachment URLs work in Markdown and HTML. |
| Google Cloud Storage | https://storage.googleapis.com/bucket/photo.png | Make the object public; signed URLs are temporary. |
| Azure Blob Storage | https://account.blob.core.windows.net/container/photo.jpg | Remove SAS tokens before embedding — they expire. |
| Cloudinary | https://res.cloudinary.com/cloud/image/upload/photo.jpg | Keep transformation segments only if you need that delivered size. |
| Shopify CDN | https://cdn.shopify.com/s/files/…/product.jpg | Keep the version query string; it busts stale caches. |
| Imgur | https://i.imgur.com/abc123.png | Use the i.imgur.com direct link, not the gallery page. |
| WordPress / CMS | https://example.com/wp-content/uploads/2024/05/photo.jpg | Use the media file URL, not an attachment page. |
Clean the URL before you embed it
Remove campaign parameters such as utm_source, utm_medium, utm_campaign, fbclid, and gclid unless you need them. Never embed a presigned S3 URL, an Azure SAS URL, or any link with an expires or signature parameter — it will stop rendering when the signature expires.
Output examples
The same image URL in each supported format. The tool above applies your chosen attributes to every line.
Direct URL
The bare image URL for CMS fields, database records, and APIs.
https://cdn.example.com/photo.jpgMarkdown
For GitHub, Notion, Obsidian, and documentation sites.
HTML
Optional attributes are added only when you set them in the tool above.
<img src="https://cdn.example.com/photo.jpg" alt="Product photo" width="800" height="600" loading="lazy" />BBCode
For forums and older community platforms that accept BBCode.
[img]https://cdn.example.com/photo.jpg[/img]Need the image to be clickable? Use our HTML Image Link Generator.
Privacy and Limitations
URL formatting happens in your browser. Photo2URL does not upload or store the image. The only optional network request is the preview, which your browser makes directly to the first image's host only when you click the preview button.
Generated snippets point to the original host, so they depend on that host staying online and public. For a hosted link under your control, upload the image with Image to URL.
Frequently Asked Questions
Is the Image Embed Generator free?
Yes. URL formatting happens in your browser, so there are no quotas, accounts, or upload limits.
Does this tool upload my image?
No. You paste an image URL that already exists somewhere else, and the tool formats it into HTML, Markdown, BBCode, or a direct URL. Formatting never fetches or stores the image.
Can I format multiple image URLs at once?
Yes. Paste one URL per line and choose an output format. Each line gets its own snippet, and the copy button copies the whole batch.
How do I make the embedded image clickable?
Use Photo2URL's HTML Image Link Generator to wrap the image URL in an anchor with a destination URL. It also adds new-tab, rel, and responsive options.
Which optional HTML attributes can I add?
Width, height, loading="lazy", and decoding="async". Alt text flows into Markdown and HTML; BBCode uses the URL only.
Should I remove tracking parameters before embedding?
Yes, when they are not needed. Remove utm_*, fbclid, gclid, and similar campaign parameters so the embedded URL stays clean. Never embed a signed or expiring URL; use a public URL instead.
Why is the preview optional?
Showing a remote image makes your browser request it from its host. The preview is opt-in so you control whether that request happens; the generated code works without it.
What if my image isn't hosted yet?
Use Photo2URL's Image to URL tool to upload the image and get a hosted CDN URL first, then paste that URL here to format it.