# SVG Converter > SVG Converter (https://svgconverter.online) turns PNG and JPG images into editable, full-color SVG vector files. It works in the browser for free with no signup, and as a paid HTTP API for developers. It works best on logos, icons, illustrations and line art; photos give large, complex files. ## Website - [PNG and JPG to SVG](https://svgconverter.online/): upload a PNG or JPG (up to 4 MB) and download an SVG. Colors are picked automatically, or you can choose your own palette ("Manually select colors"). Smooth color ramps become SVG gradients unless you turn "Gradients" off. Transparent backgrounds stay transparent. A noise filter (1-8, default 4) removes small specks. After converting, click any shape to recolor it or make it transparent, then download the SVG or a PNG. - [SVG to PNG](https://svgconverter.online/svg-to-png): upload or paste an SVG, click shapes to recolor them or make them transparent, and export a PNG at 1x-8x scale or an exact pixel size for the longest side. - [SVG Converter API](https://svgconverter.online/svg-api): documentation for converting images from your own code. - [Pricing](https://svgconverter.online/pricing): the website is free; the API has a free trial, then monthly plans priced by number of conversions. - [Account](https://svgconverter.online/account): sign in to create API keys, choose a monthly API plan, and see usage. - [Terms of Use](https://svgconverter.online/terms) and [Privacy Policy](https://svgconverter.online/privacy). The website is free with a daily fair-use limit per visitor. Images are processed temporarily and discarded after conversion; nothing is stored. ## API Convert an image with one HTTP request and get the SVG back as JSON. The API uses the same tracer and default settings as the website. ### Getting access 1. Sign in at https://svgconverter.online/account and create an API key. The key is shown once, when it is created. 2. Choose a monthly plan (number of conversions per month) on the same page. Larger volumes are available on request. 3. Call the endpoint below from your server. Keep the key secret; don't use it in browser code. ### Endpoint `POST https://svgconverter.online/api/v1/vectorize` ### Authentication Header: `Authorization: Bearer YOUR_API_KEY` ### Request The raw image file is the request body, with a matching `Content-Type`: `image/png`, `image/jpeg`, `image/webp` or `image/gif`. Maximum request size 4.5 MB. ### Options One optional query parameter on the endpoint URL: - `gradients`: `true` (default) turns smooth color ramps into SVG gradients; `false` gives flat colors only (e.g. for cutting, embroidery or screen printing). Example: `POST https://svgconverter.online/api/v1/vectorize?gradients=false` ### Response `200 OK` with JSON: ```json { "svg": "…", "width": 1024, "height": 1024 } ``` - `svg`: the SVG document. It has a viewBox, so it scales to any size. - `width`, `height`: the SVG's size in pixels, equal to the uploaded image. Response headers `X-Quota-Limit` and `X-Quota-Remaining` give the account's monthly conversions and how many are left. ### Quota Each successful conversion counts once against the monthly plan; failed conversions don't count. The count resets on the 1st of each month (UTC). Unused conversions don't carry over. ### Errors Errors return JSON: `{ "error": "message" }`. - `400`: the body is empty or isn't a readable image, or `gradients` isn't `true` or `false`. - `401`: the API key is wrong or has been revoked. - `402`: this month's conversions are used up, or the account has no plan. - `403`: no API key was sent. - `413`: the request is larger than 4.5 MB. - `503`: a temporary problem; retry after a few seconds. ### Limits and timing Images are traced at up to 4096 px on the longest side. Most images take 10-20 seconds and complex ones up to a minute, so set the client timeout to at least 120 seconds. ### Examples curl: ```bash curl https://svgconverter.online/api/v1/vectorize \ -H "Authorization: Bearer $SVGCONVERTER_API_KEY" \ -H "Content-Type: image/png" \ --data-binary @logo.png \ --max-time 120 \ | jq -r .svg > logo.svg ``` JavaScript (Node.js 18 or newer): ```javascript import { readFile, writeFile } from "node:fs/promises"; const res = await fetch("https://svgconverter.online/api/v1/vectorize", { method: "POST", headers: { Authorization: `Bearer ${process.env.SVGCONVERTER_API_KEY}`, "Content-Type": "image/png", }, body: await readFile("logo.png"), signal: AbortSignal.timeout(120_000), }); const data = await res.json(); if (!res.ok) throw new Error(data.error); await writeFile("logo.svg", data.svg); console.log("Conversions left this month:", res.headers.get("X-Quota-Remaining")); ``` Python: ```python import os import requests with open("logo.png", "rb") as image: res = requests.post( "https://svgconverter.online/api/v1/vectorize", headers={ "Authorization": f"Bearer {os.environ['SVGCONVERTER_API_KEY']}", "Content-Type": "image/png", }, data=image, timeout=120, ) data = res.json() if not res.ok: raise RuntimeError(data["error"]) with open("logo.svg", "w") as svg: svg.write(data["svg"]) print("Conversions left this month:", res.headers["X-Quota-Remaining"]) ```