⚡
usefultools.dev
SVG

SVG Viewer

Paste SVG code and see a live preview instantly. Inspect, debug, and visualize SVG graphics without any setup.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

<svg><circle cx="50" cy="50" r="40"/></svg>
Black circle, radius 40
<svg><text y="20">Hi</text></svg>
Black text "Hi"
<?xml version="1.0"?><svg><rect width="80" height="40"/></svg>
Black 80×40 rectangle
<circle r="40"/>
Invalid SVG: root element must be <svg>
logo.png
Please select an SVG file
📖

Présentation

SVG Viewer draws SVG markup as an image so you can see what a piece of code actually renders. SVG (Scalable Vector Graphics) is an XML-based vector format used for icons, logos, charts and illustrations, and it stays sharp at any size.

Paste code into the SVG code box or upload an .svg file. The tool checks that the markup is well-formed XML with <svg> as the root element, shows the parser message with line and column if it is not, and adds a missing xmlns declaration for you. A leading <?xml?> line, DOCTYPE or comment is accepted. Use it to preview library icons, debug broken markup or check generator output.

The preview is drawn through an <img> element in your browser, so scripts never run, external images and fonts are not loaded, and nothing is uploaded.

Pourquoi utiliser cet outil ?

  • Preview SVG code before embedding it in a web page
  • Debug SVG rendering issues by isolating problematic elements
  • Understand SVG structure when working with icon libraries
  • Quickly visualize SVG output from a code generator
⭐

Fonctionnalités

🎨

Live Preview

SVG renders instantly as you type or paste — no need to save or refresh.

📂

Upload SVG Files

Open a local .svg file with the Upload SVG button instead of pasting its code.

🛡️

Script-safe Preview

The preview is rendered as an image, so scripts or event handlers inside an SVG never run.

🧪

Error Messages

Malformed markup or a non-<svg> root shows a message, with line and column when the parser reports them.

🧩

Namespace Fix-up

A missing xmlns (and xmlns:xlink when xlink: is used) is added automatically so the preview renders.

📐

Scalable

The preview scales down to fit the card and, being vector, stays crisp at any size.

📋

Copy & View Source

Copy the code with Copy Code or expand View SVG Source to read it under the preview.

🌐

No Upload

Everything runs in the browser — your SVG code stays on your machine.

🛠️

Mode d'emploi

1

Paste SVG code

Copy your SVG markup and paste it into the "SVG code" box, or click "Upload SVG" to open an .svg file.

2

See the preview

The rendered SVG appears under "Preview" immediately. An invalid SVG shows a red error message instead.

3

Edit and iterate

Change the code and the preview updates as you type. Click "Copy Code" or open "View SVG Source" to take the markup back.

🤔

Questions fréquentes