SVG

Что такое SVG?

SVG (масштабируемая векторная графика) - это векторный формат изображений на основе XML, который описывает графику с помощью математических форм, а не пикселей, что позволяет бесконечно масштабировать без потери качества.

Последнее обновление:

Year1999
TypeВекторный
UsageW3C

What is it?

SVG (масштабируемая векторная графика) - это стандартный формат W3C, представленный в 1999 году. В отличие от растровых форматов, таких как JPG и PNG, которые хранят изображения в виде сетки пикселей, SVG хранит изображения в виде математических описаний форм, путей и цветов с использованием разметки XML.

Поскольку SVG использует математику вместо пикселей, изображения SVG могут быть масштабированы до любого размера - от фавикона до билборда - без потери качества. Файлы SVG также редактируемы как текст, могут быть стилизованы с помощью CSS и анимированы с помощью JavaScript.

Technical Specifications

StandardW3C SVG Specification
File Extension.svg / .svgz
MIME Typeimage/svg+xml
Format TypeVector (XML-based)
ScalabilityInfinite - no quality loss
AnimationSupported (CSS and JS)

Pros & Cons

Advantages

Infinitely Scalable

Looks sharp at any size from 16x16 pixels to poster-sized without any pixelation.

Small File Size

Simple graphics like logos and icons are often smaller than equivalent PNG files.

CSS and JS Controllable

SVG elements can be styled, animated, and manipulated with code in the browser.

Accessible

SVG supports text descriptions and semantic markup for accessibility.

Disadvantages

Not for Photos

SVG cannot efficiently represent photographic images - use JPG or WebP instead.

Complex SVGs Can Be Slow

Very detailed SVG illustrations with thousands of paths can hurt rendering performance.

Security Concerns

SVG can contain scripts - untrusted SVG files should be sanitized before display.

Limited Print Support

Some print workflows require conversion to PDF or rasterization.

When to Use It

SVG - идеальный формат для любой графики, которая должна масштабироваться или быть интерактивной в интернете.

Logos and Branding

Company logos that appear in multiple sizes - from favicon to banner - stay crisp at every scale.

Icons

UI icons that need to work at 16px and 512px alike, with optional color theming via CSS.

Illustrations

Charts, diagrams, maps, and illustrations that need to be sharp on retina displays.

Animations

Lightweight animated graphics and transitions without video overhead.

Convert Your Files Online - Free

Our free online converter supports all major formats. No software to install, no registration required.

Start Converting Now

Frequently Asked Questions

Can I use SVG on any website?

Yes. All modern browsers support SVG natively in HTML. You can embed SVG inline, as an img src, or as a CSS background image.

Is SVG better than PNG for logos?

Yes, for web use. SVG logos stay sharp at any size and are often smaller in file size. PNG is a raster format - a PNG logo may look blurry when scaled up.

Can SVG files be animated?

Yes. SVG supports animation through CSS animations, CSS transitions, and JavaScript (GSAP, anime.js). SMIL animation is also part of the SVG spec but less commonly used.

Is SVG safe to use from untrusted sources?

Be careful. SVG files can contain embedded scripts. Never display SVG from untrusted sources without sanitizing it first. Use a library like DOMPurify to sanitize user-uploaded SVGs.

What is the difference between SVG and EPS?

Both are vector formats. SVG is designed for the web (browser-native, CSS/JS compatible). EPS is designed for print and professional publishing. SVG is the modern choice for most use cases.