SVG libraries for C#
There are 2 main open-source SVG libraries for .NET, and they share code:
- SVG.NET (NuGet
Svg) is an object model for SVG: open a file, find and change elements, create documents from code and save them. It renders withSystem.Drawing(GDI+), which on .NET 6 and later works only on Windows. Pick it to generate or edit SVG, or to render on Windows desktop apps. - Svg.Skia renders SVG with SkiaSharp on Windows, Linux, macOS, Android, iOS and WebAssembly. It uses a fork of the SVG.NET object model for parsing. Pick it to convert SVG to PNG, JPEG or PDF on servers or in Avalonia, MAUI and Uno apps.
Magick.NET (ImageMagick) can also rasterize SVG if you already use it for other formats.
- SVG.NET SVG.NET (NuGet package Svg) is a C# library to read, modify, write and render SVG. How to install it, open an SVG, render it to PNG, change elements.
- Svg.Skia Svg.Skia renders SVG with SkiaSharp in C# on Windows, Linux and macOS. How to install it, convert SVG to PNG, JPEG and PDF, render at a given size.