SVG to PNG converter
Convert an SVG to PNG, JPG or WebP at the pixel size you choose, without uploading anything, and see exactly what each conversion changed.
Nothing is uploaded
Every conversion runs in this browser tab, on your own machine. No file is sent to this site or to anyone else — there is no server here to send one to — so a confidential image stays confidential, and you can watch your browser’s network tab while you convert it and see for yourself.
WebP here is never lossless
WebP has a lossless mode, and a browser canvas cannot write one — there is no way to ask it for one. Every WebP produced here is a lossy encode, at the top of the quality control just as much as below it, so the result is never a lossless copy of what went in.
Colours may shift
The picture is redrawn here and written out as ordinary sRGB, carrying no embedded colour profile. A photograph taken in a wider space — Display P3 on a recent phone, or Adobe RGB — comes out looking the same in most places, but its most saturated colours can end up a little duller.
The other converters
A photograph was never a drawing, so there is nothing to rasterise and the only question is which pixel format to keep it in. That page opens on PNG and is about what moving between JPG and PNG changes.
JPG to PNG converterA rasterised drawing is flat colour and hard edges, which WebP stores in far fewer bytes than PNG does. That page opens with WebP chosen, and converts one back the other way too.
WebP converter
What an SVG is, and why rasterising only goes one way
An SVG is not a picture. It is a description of one — a list of shapes, paths, colours and text, each with coordinates, written out in a text file that something else reads and draws. A JPG or a PNG is the opposite: a grid of pixels, decided once when the file was written. That single difference is behind everything on this page, including the one question this converter has to ask you and the other two converters never do.
- It is text you can read. Open an SVG in any text editor and the shapes are written out in front of you, which is also how you can check for yourself what size the file claims to be and what it points at.
- It has no resolution at all. The same file is a crisp icon at the size of a full stop and a crisp poster on a wall, because the drawing is worked out afresh by whatever is displaying it rather than stored anywhere.
- What it is good at is flat artwork — logos, icons, diagrams, charts, maps, anything drawn rather than photographed. What it is hopeless at is a photograph, which has no shapes to describe and would need a line of the file per pixel.
- Rasterising one is what this page does, and the reason is nearly always somewhere that will not accept the format: an upload form, an older image editor, a document or slide template, a social preview, an email, a printing service.
Turning it into a PNG fixes the drawing into pixels at one chosen size, and that is a door that only opens one way. The shapes are not stored in the result and no setting here keeps them, so enlarging the PNG afterwards enlarges its pixels rather than redrawing anything, and this page writes no vector format at all — turning a picture back into shapes is a different problem with different answers, not the reverse of this one. So keep the SVG. What you download here is a copy made for one purpose and one size, and the way to get a second size is to convert the original again rather than to resize what you already have.
Where the size in the fields came from
Because a vector has no pixels of its own, something has to decide how many it comes out with, and this page starts by reading whatever the file itself implies. That number goes into the width and height fields, and a sentence beside them names the file and says which of exactly three places the number was taken from. It is worth reading before you convert, because the three are not equally trustworthy and only you can tell which one you meant.
- The file states its own size, in pixels. This is the strongest of the three: somebody who exported the drawing said how large it should be, and the fields simply repeat them.
- The file states its size in physical units — inches, centimetres, millimetres, points or picas — and it has been converted at ninety-six pixels to the inch, which is what the web means by an inch rather than a measurement of your screen. A drawing prepared for print often arrives this way, and the pixel size that comes out of it is a faithful conversion of a number that was never about pixels.
- The file states no usable size at all, so the size was measured from its viewBox instead. That is the one to look at twice: a viewBox is the coordinate system the shapes are drawn in and not a size anybody chose, so an icon whose coordinates run from zero to twenty-four arrives asking to be a picture the size of a full stop. Icon sets are also commonly written with a width and a height in per cent, which is a size of something this file does not have and is read as no size, so those land here too.
Whichever of the three answered, the number is rounded to whole pixels once, at the moment it is read, because a canvas is allocated in whole pixels and there is nowhere to put a fraction. That matters for one thing in particular: everything else works from the rounded number you can see rather than from the fraction behind it, so twice a drawing shown as thirty-one pixels wide is sixty-two and not the sixty-three a second rounding would produce. The size on screen and the size the arithmetic uses are the same size, which is the only arrangement in which the fields mean what they say.
Choosing the size you need — and the drawing that states none
The size the file implies is only ever a starting point, and it is offered as one rather than imposed. Everything about the two fields is arranged so that the ordinary case takes no thought and the exact case is still available, which is the whole of the difference between this page and its two siblings — a photograph is converted at the size it already is, and there is nothing to decide.
- Type a width and the height follows, and type a height and the width follows, so the drawing keeps its proportions without your having to work anything out. That is the default because distorting a logo by accident is the mistake worth making impossible.
- Untick the lock when you genuinely need an exact box — a banner slot, a fixed avatar, an icon sheet — and the two fields become independent. The drawing is then stretched to fill whatever you asked for, which is what you wanted and is also why it is a deliberate act rather than the default.
- The row of multipliers is the quick way to the sizes people actually want, and each of them is measured against the size the file states rather than against whatever is in the fields at that moment. So pressing the same multiplier twice gives you the same answer twice, instead of compounding into something you did not ask for.
- A multiplier that has no answer is offered as unavailable rather than as a button that does nothing. Multiplying a drawing that is already enormous can reach a size no image format can express, and a control that quietly declined would be worse than one that shows you it cannot.
Then there is the file that states nothing: no width and height this tool can read, and no viewBox to measure either. It is commoner than it sounds — a drawing exported straight out of some editors, or one hand-written for a page that was going to size it with CSS. There is genuinely no size in it, so the fields open empty, no sentence appears about where a number came from, there is nothing to multiply and no proportion to keep, and the row refuses and asks you for a width and a height. That refusal is the point rather than a failure: a browser handed such a file falls back to a small fixed box that nobody chose, and being asked once is better than downloading that and finding out later.
A pair that is not a size is refused in its own words, which is the other half of the same care. Zero, a negative number, half a pixel, or a number larger than any image format can express are each refused rather than rounded, clamped or quietly replaced by the file’s own size — a conversion at a size nobody asked for is exactly what this page exists not to do. And if what you have chosen is a photograph rather than a drawing, the size fields do not appear at all: a raster is converted at its own dimensions, and a control that could not change anything is worse than no control.
Which format to rasterise to
This page opens on PNG because that is the right answer for almost every vector, and the other formats are one click away rather than behind another page. What you are choosing between is a format that stores the pixels exactly and two that trade some of them for a smaller file, and a drawing is unusually lopsided evidence: flat colour and hard edges are precisely the content lossy compression handles worst.
- PNG is the default and is usually the end of the discussion. It stores the rasterised drawing exactly, it carries transparency, and it compresses flat areas of one colour extremely well — which is what a logo or an icon mostly is, so the file is often smaller than the reputation of the format suggests.
- JPG is worth choosing only when something at the other end insists on it. It cannot store transparency at all, so a background colour has to be painted behind your drawing first, and its compression puts a grey fringe along exactly the crisp edges and lettering you rasterised the vector to keep.
- WebP is the middle answer for a web page: it carries transparency and it is usually smaller than the PNG. It is lossy here at every quality setting, top of the control included, so it is a good choice for a picture going onto a page and a poor one for a master copy you will edit again.
- None of the three is a vector, and this page writes no vector format. If what you need is a scalable file, the SVG you already have is it — keep it, and treat whatever you download here as a copy made for one place.
The quality control appears only for the two formats that have something to trade, which is JPG and WebP; PNG discards nothing, so no control is offered rather than one that sits there doing nothing. Each row shows the size the file came out at, so the bargain you are striking is a number in front of you. Moving that control re-encodes a picture that has already been drawn, where it can, rather than rasterising the drawing again, while changing the size does have to draw it again — which is the right way round, since the second is the one that genuinely produces different pixels.
What a rasterisation cannot carry across
Everything here is done with the drawing machinery already built into your browser: the file is handed over as a picture, drawn once at the size you chose, and written back out in the format you asked for. That is what lets the tool work with nothing uploaded, nothing installed and nothing downloaded beyond the page itself — and for a vector it also decides what the result can possibly contain, because an SVG is a document rather than a block of pixels and a document can ask for things.
Handed over the way it is here, it does not get them. Nothing inside the file runs and nothing outside the file is fetched, which is a deliberate property and a genuinely valuable one: an SVG can carry a script, and it can carry a reference to an address somewhere that would be requested the moment the drawing was displayed. Opening a stranger’s drawing here does neither. What that safety costs is set out below, and the first two of them are announced on the row rather than left for you to notice.
- Anything the file points at outside itself will not load — a linked image, a stylesheet, a font. That is true of an address on the web and equally true of a file sitting in the same folder, which is the commoner case by far and the reason the notice says the parts will not load rather than saying they were remote. Whatever they were for is missing from the result, and the fix is to embed them in the drawing and convert it again.
- Text is drawn with the fonts installed on this machine. The letters are in the result and they look right to you, but the same file rasterised on another computer may pick a different face and come out a different picture. If the exact shapes matter, convert the text to paths in whatever drew the file, and then nothing is being looked up at all.
- Anything the drawing does over time is not in the result. The output is a still picture in every format offered, so a file that animates itself contributes the one moment that was drawn, and nothing interactive survives the trip either.
Two ceilings on the output are worth stating plainly rather than leaving to be discovered. The PNG is written by the browser’s own compressor, which is decent rather than exhaustive, so a dedicated optimiser could still shave a slice off the file without changing a pixel of it; and the WebP is a lossy encode at every setting, because a browser cannot be asked for the format’s lossless mode at all. Both could be lifted by shipping a real encoder compiled to run inside the page, and this tool deliberately does not — it is a few hundred kilobytes every visitor would download so that some of them get a slightly smaller file, on a site where every other page works the moment it renders. On this page in particular it would also buy less than it appears to: the rasterising is the browser’s own drawing of your vector, and an encoder cannot change how that was drawn.
What each row says about your drawing, and when it refuses
A converter that works in silence is how somebody ends up with a logo on a black background, or a drawing missing the picture it was pointing at, and finds out days later and somewhere else. Every row here carries a short account of what was actually done to that file — and carries nothing at all when nothing notable happened, which is what makes the notices worth stopping for. A vector meets a different set of them from a photograph, and three of the tool’s notices cannot apply to one at all: a drawing has no camera details to drop, nothing telling it which way up it is, and no frames to lose.
- Something the drawing points at will not load. It appears for a file that refers to an image, a stylesheet or a font that is not inside it, whether by an address or by a path beside it, and it is the explanation for a result that came out with a piece missing.
- Text was drawn with the fonts on this machine. It appears only where the drawing really puts letters on the canvas, so a file with an empty text element in it says nothing, and a drawing with no text at all says nothing either.
- Transparency was flattened, and onto which colour. Converting to JPG has to put something behind the drawing, and a colour control appears as soon as a file in your list genuinely needs one. This notice is measured rather than assumed: it waits until a genuinely see-through pixel has been found in what was drawn, so a drawing whose own artwork covers the whole picture converts to JPG saying nothing about it.
- The name and the contents disagree. The format is decided from the contents of the file and never from its extension, so a drawing somebody saved with the wrong ending is read and converted correctly as the SVG it is — and you are told, because it is a true thing about your file you probably did not know.
- WebP at this setting is still lossy. Rasterising a drawing and then asking for the very top of the quality control feels as though it ought to hand back exactly what was drawn, and it does not — that is the belief the notice exists to correct, which is why it appears there and at no lower position.
Where a file cannot be converted at all, the tool says why rather than producing something. A file that is none of the formats it reads is named and refused, and so is one that is a supported format whose beginning cannot be read — for a drawing that means its opening tag, which is the only thing a vector has in the way of a header. A file with a drawing somewhere inside a web page is not an image file and is refused as one, and so is a drawing your browser turns out to be unable to draw, however sound it looked from the outside. Nothing is guessed at, and nothing half-worked is handed back as though it were finished.
The refusal you are likeliest to meet here is the one about size, and that is a fact about this page rather than about your file: a multiplier is one click away, a drawing will cheerfully be asked for any size at all, and there is nothing in a vector to stop you. What stops you is the browser, which will only hold a picture up to a certain area — a different area on a phone than on a desktop, and a different one again between two browsers on the same machine. Crossing it produces no error whatever, just a blank image of a few kilobytes that looks like a finished conversion until it is opened. So this tool writes a known pixel into the picture at the size you asked for and reads it straight back before a single shape is drawn; if it does not come back, you get the refusal with the size in it and no file. Nothing anywhere is compared against a fixed number, so the ceiling you meet is your own device’s and never one chosen for somebody else.
Why your drawing never leaves this tab
A drawing gives away more than a photograph does, because a drawing is a text file and you can read it. Layer names, the name of whoever exported it, a comment somebody left in it, the address of every piece it was pointing at — all of that is written out in the file, and none of it goes anywhere. Your SVG is read by this browser tab and rasterised by your own machine’s processor. There is no server on the other end of this page that could accept one, so this is a description of how the tool is built rather than a promise about how it is operated.
A few seconds in the network panel of your browser’s developer tools settles it, and for a drawing there are two things worth watching rather than one. Nothing goes out carrying your file, and nothing goes out on the file’s behalf either, however many addresses are written inside it. Once the page has loaded it is a handful of static files with no code running anywhere else, so you can disconnect from the network completely and go on rasterising for as long as you like.
- A drawing you would not send to a stranger — an unannounced logo, a floor plan, a diagram of something internal — can be rasterised here without it leaving your machine at all.
- What comes out of the rasterising is held in this tab until you save it, and closing the tab is the whole of deleting it. Neither the drawing you brought nor the picture made from it is remembered from one visit to the next.
- A drawing that arrived from somewhere you do not fully trust is safe to open here, because nothing in it is run and nothing it points at is fetched. Rasterising it is also a way of stripping it: what you download is pixels, and pixels cannot ask for anything.
Frequently asked questions
- Why is it asking me for a width and a height?
- Because your drawing does not say. An SVG has no pixels of its own, so a size has to come from somewhere: the file’s own width and height, or the coordinate system of its viewBox if it has one. Yours states neither in a form that can be read as a size — which happens with drawings exported straight out of some editors, and with ones written for a web page that was going to size them with CSS. Rather than hand you a small fixed box that nobody chose, which is what a browser falls back to, the tool asks. Both fields have to be filled in this one case rather than one of them, because there are no proportions to keep either — the file states none, so there is nothing to work a second number out from, and for the same reason no lock and no multipliers are offered. Fill in the pair you want and the conversion runs at it.
- Where did the size in the fields come from, and should I trust it?
- From one of exactly three places, and the sentence beside the fields names your file and says which. If the file states its own size in pixels, the fields simply repeat it and it is as trustworthy as whoever exported the drawing. If it states its size in physical units — inches, centimetres, points — the number is a conversion at ninety-six pixels to the inch, which is what the web means by an inch; that is faithful, but the original was not thinking in pixels at all. And if the file states no size, the number was measured from the viewBox, which is the coordinate system the shapes are drawn in rather than a size anybody chose — an icon whose coordinates go up to twenty-four will offer you a picture the size of a full stop. That last one is the case to change rather than accept.
- Part of my drawing is missing — a photo, or a logo inside it, did not come out. Why?
- Because the drawing was pointing at it rather than containing it, and nothing outside the file is fetched here. That covers a reference to an address on the web and equally a reference to a file sitting in the same folder, which is by far the commoner case: the drawing renders perfectly in the folder it lives in and comes out with a hole in it anywhere else, including here. The row tells you when a file does this. Not fetching is deliberate rather than a limitation — a drawing from a stranger that could request things is exactly what should not be opened casually — so the fix is at your end: embed the referenced pieces in the SVG, in whatever drew it, and convert it again.
- Will the text in my drawing look the same on somebody else’s machine?
- Not necessarily, and this is the notice the row raises about it. An SVG that draws letters names a font and leaves the drawing of it to whatever is displaying the file, so the rasterisation here uses the fonts installed on this machine. What you download is fixed and will look the same everywhere from now on — it is pixels — but the same SVG rasterised on another computer may well pick a different face and produce a different picture. If the exact letterforms matter, the reliable answer is to convert the text to paths in whatever drew the file. The letters then become shapes like every other shape in it, nothing is looked up, and the drawing rasterises identically wherever it is opened.
- Should I rasterise to PNG, JPG or WebP?
- PNG unless you have a reason, which is why the page opens on it. A rasterised vector is flat colour and hard edges, PNG stores those exactly and compresses them very well, and it keeps transparency — so a logo or an icon usually comes out both correct and small. Choose WebP for a picture going onto a web page, where it carries transparency too and is usually smaller still, remembering that it is lossy here at every setting including the top of the control. Choose JPG only when something at the other end insists on that format: it cannot hold transparency, so a background has to be painted behind your drawing, and its compression damages exactly the crisp edges and lettering you rasterised the vector to keep. If you are unsure, convert twice and compare the two rows.
- My PNG looks fuzzy now that I have enlarged it. Can I get the sharpness back?
- Not from the PNG, and not from any tool. Rasterising throws the shapes away and keeps pixels, so enlarging the result enlarges the pixels — a copy of it will never be sharper than the size it was made at. The answer is to go back to the SVG and convert it again at the size you actually need, which costs nothing and is why it is worth keeping the original rather than replacing it with what you downloaded. This page does not write an SVG and no setting here turns pixels back into shapes: that is a genuinely different problem, and a converter that offered it would be guessing at curves rather than restoring them.
- My icon has transparent parts — do they survive the rasterising?
- They survive into PNG and into WebP, which both have somewhere to keep them, so the rasterised icon comes out with the same see-through edges the drawing had. They do not survive into JPG, which has no channel for transparency at all: the tool paints a colour behind your icon first and names that colour on the row. White is what it paints unless you say otherwise, since white is what most documents, slides and upload forms turn out to be, and the colour control appears as soon as a file in your list actually needs one — changing it runs the conversion again. One thing worth knowing is that the notice is about pixels rather than about the drawing. It waits until a see-through pixel has really been found in what was drawn, so an icon whose artwork fills its whole box goes to JPG in silence.
- Is my SVG sent anywhere, and can I rasterise offline?
- No, and yes. Your drawing is read by this tab and rasterised by your own machine, and there is no server on this site that could accept one. The network panel of your developer tools shows you both halves of that in one go, since a drawing stuffed with external references produces no request either. After the page has loaded it wants nothing further from the network, so you can work with it disconnected for as long as you like. And because rasterising keeps the pixels and throws the document away, what you save carries none of the text your SVG was written as — no layer names, no author, no addresses.