Convert PDF Content to SVG Vector Files

Converting PDF to SVG translates one vector page-description language into another: PDF paths, fills, and glyph outlines become SVG path elements, so diagrams and line art stay infinitely scalable with no quality loss. Unlike exporting to JPG or PNG, nothing is rasterized — except images that were already raster inside the PDF. This page covers the three dependable converters — pdf2svg, Inkscape, and MuPDF's mutool — and explains why converted text usually arrives as outline paths rather than editable characters.

Why there is no one-click converter on this page

A faithful PDF-to-SVG translation needs a full PDF graphics interpreter with font-outline extraction — engines like Cairo or MuPDF that are not available to in-page JavaScript. Rather than ship a converter that rasterizes and merely wraps a bitmap in SVG tags, we document the tools that keep your vectors vector.

Disclosure: this page contains affiliate placeholder links. If they were live, we could earn a commission at no extra cost to you.

AFFILIATE PLACEHOLDER: Recommended desktop PDF suite (placeholder link)

How to convert PDF to SVG (step by step)

Method 1: pdf2svg (free, command line, most faithful)

  1. Install it: brew install pdf2svg on macOS, sudo apt install pdf2svg on Debian/Ubuntu (Windows builds exist via MSYS2).
  2. Convert one page: pdf2svg diagram.pdf diagram.svg 1 — the trailing number selects the page.
  3. Convert every page: pdf2svg diagram.pdf page-%d.svg all%d numbers the output files.
  4. Verify: open the SVG in a browser and zoom far in; lines and text should stay perfectly sharp.

pdf2svg renders through Poppler into Cairo's SVG surface, which reproduces the page essentially exactly. It is the right default when fidelity matters more than editability.

Method 2: Inkscape (free, when you want to edit the result)

  1. Open the PDF in Inkscape (File → Open); pick the page in the import dialog.
  2. Choose how text is handled: Import text as text keeps it editable if you have the fonts installed, otherwise use Draw all text into paths for visual fidelity.
  3. Edit as needed — every PDF object arrives as a selectable Inkscape object — then File → Save As → Plain SVG.
  4. Command-line variant for batches: inkscape file.pdf --pdf-page=1 --export-type=svg --export-filename=out.svg.

Method 3: mutool from MuPDF (free, fastest for many pages)

  1. Install MuPDF (brew install mupdf-tools or apt install mupdf-tools).
  2. Run mutool convert -o page-%d.svg file.pdf to emit one SVG per page, or append page numbers such as 1-5 to limit the range.

How it works

PDF and SVG are close cousins. A PDF page's content stream sets graphics state and paints paths — m/l/c operators for moves, lines, and Bézier curves, f and S for fill and stroke — while SVG expresses the same geometry as <path d="M … C … Z"> with fill and stroke attributes. A converter interprets the PDF stream and emits the corresponding elements, mapping the coordinate systems (PDF's origin is bottom-left with y increasing upward; SVG's is top-left, so everything is flipped by a transform) and translating graphics state: clipping paths become <clipPath>, transparency group settings become opacity, gradients become <linearGradient> or <radialGradient> definitions.

Text is the interesting compromise. A PDF shows text by referencing glyphs in an embedded font — usually a subset containing only the characters used, under license terms that generally do not permit re-embedding elsewhere. Rather than gamble that the viewer of the SVG has the right font, converters fetch each glyph's outline from the embedded font program and write it as a filled path (Cairo-based tools deduplicate repeated glyphs via <use> references). The page renders identically on every machine, but the "text" is now geometry: not selectable, not searchable, and verbose — one reason converted SVGs run large until minified with SVGO and served gzipped.

Raster content passes through unchanged in the other direction: a JPEG photograph inside the PDF is carried into the SVG as a base64-encoded <image>, still exactly as many pixels as before. That is also why converting a scanned PDF to SVG achieves nothing — the scan is one big image, and wrapping it in vector markup does not make it scalable. Genuine vectorization of scans requires bitmap tracing, a different operation with different failure modes.

Worked example: a logo and a wiring diagram

Two real conversions show the range. A one-page logo sheet (48 KB PDF, pure vector) converted with pdf2svg in under a second to a 214 KB SVG; running SVGO brought it to 61 KB, and gzip on the server delivered 18 KB — crisp at any zoom, ready for a website header. A 9-page electrical wiring diagram set (1.3 MB PDF) converted with mutool convert to 9 SVGs totalling 6.8 MB in about 3 seconds; the growth came almost entirely from the dense annotation text rendered as outline paths (one page held roughly 2,900 path elements). After SVGO the set measured 2.4 MB, and zooming to 1600% on a junction detail showed perfectly sharp 0.25 pt conductor lines that a 216 dpi PNG export of the same page (2.1 MB for that single page) rendered as visibly stepped pixels.

Frequently asked questions

Can a PDF be converted to SVG without losing quality?

Yes, for vector content: both formats describe shapes with paths and curves, so lines, fills, and text outlines transfer with no resolution loss at all. Any photos embedded in the PDF stay raster — they are carried across as embedded images, not magically vectorized.

What is the best free tool to convert PDF to SVG?

pdf2svg is the simplest for faithful page-to-file conversion, and mutool convert from the MuPDF project is a fast alternative with the same page-per-file model. Choose Inkscape when you want to edit the graphic afterward, since it opens the PDF page as editable objects.

Why did my text turn into paths after converting PDF to SVG?

Converters draw each glyph as its outline curves because the PDF's embedded font subset cannot be relied on in the SVG. The result renders identically everywhere but is no longer editable as text; Inkscape's import can map text back to installed fonts if you need it live.

Can I convert a whole multi-page PDF into one SVG?

Not usefully — SVG has no page concept, so tools emit one SVG file per PDF page. Convert with a pattern like pdf2svg file.pdf page-%d.svg all and you get a numbered file per page.

Does converting a scanned PDF to SVG make it scalable?

No. A scan is a photograph, so the SVG would just wrap the same bitmap and it would pixelate at the same zoom level. True vectorization of a scan requires tracing, for example Inkscape's Trace Bitmap, which works for logos and line art but not for text or photos.

Why is my SVG file much bigger than the PDF it came from?

Text-as-outlines is verbose: every letter becomes a multi-curve path written as plain XML, and PDF's compressed streams have no direct SVG equivalent. Minifying with SVGO and serving the file gzipped usually claws most of the difference back.

Related tools