HOSTING

Share an SVG file as a link

An SVG sent as an attachment often opens in an editor or downloads. Upload it to a host that serves it as an image, or put it inside one HTML page, and send a link that opens in any browser.

3 min read·

Logos, icons, diagrams and charts exported from Figma, Illustrator, Inkscape or a plotting library are often SVG files. Attached to an email or a chat message, an .svg may open in a text editor, a design app or not at all, depending on the reader's computer.

A browser draws SVG natively. Hosted at a link and served with the image/svg+xml type, the file opens as the picture, sharp at any zoom level.

Option 1: upload the .svg as it is

Drag the .svg file onto the FileShare Pro dashboard and copy the link. FileShare Pro accepts SVG uploads and serves them as image/svg+xml, so the browser draws the image instead of downloading it.

This suits a single logo or icon you want someone to look at or download. The browser shows the drawing at the size written in the file.

Option 2: put the SVG inside one HTML page

Wrapping the SVG in a page lets you add a title, a caption or several drawings side by side, and makes the drawing fit the screen it is viewed on. Create drawing.html with this structure:

  • ✓<!doctype html>, <meta charset="utf-8"> and <meta name="viewport" content="width=device-width, initial-scale=1"> in the head.
  • ✓A style rule in the head: svg { width: 100%; height: auto; max-width: 900px; display: block; }
  • ✓The SVG pasted into the body: open the .svg in a text editor, copy everything from <svg to </svg>, and paste it where the drawing should appear.
  • ✓Check that the <svg> tag has a viewBox attribute, such as viewBox="0 0 400 200". The viewBox is what lets the drawing scale while keeping its proportions. Most design tools write one on export.
  • ✓Tested in Chrome: a drawing with viewBox="0 0 400 200" and that style rule drew at 484 by 242 pixels in a narrow window and 900 by 450 in a wide one.

Upload it and send the link

Drag the .html file onto the FileShare Pro dashboard and copy the link. The page opens in the browser, and viewers need no account.

Turn on comments and readers can leave a note on the page after typing a name, such as a color to change on a logo. When the drawing changes, upload the new file over the old one and the link stays the same: updating a shared link without changing it.

Drawing diagrams from text instead? See sharing a Mermaid diagram as a link or sharing a draw.io diagram as a link.

Frequently asked

How do I share an SVG file so it opens in the browser?

Upload it to a host that serves SVG with the image/svg+xml type and send the link. The browser draws the image instead of downloading it.

Why does my SVG not scale to the screen?

The <svg> tag needs a viewBox attribute, and the page needs a style such as width: 100%; height: auto. Without a viewBox the drawing stays at its fixed width and height.

Can people comment on an SVG?

Put the SVG inside an HTML page and upload that page. Comments on FileShare Pro are left on the page after typing a name; no account is needed.

Is it free?

Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free