SVG:
SVG stands for Scalable Vector Graphics. SVG files use .svg extension. It is a vector image composed of paths. SVG files are editable and mostly used for the devices with high pixel density.
Example :
Code:
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="white" stroke-width="3" fill="#0f9d58" />
</svg>
|
Output:
JPEG:
JPEG stands for Joint Photographic Experts Group. For JPEG images extension used are .jpg and .jpeg. It uses lossy compression algorithm. It is a raster image composed of pixels. JPEG image quality decreases on zooming the image.
Example :

Difference between SVG and JPEG:
| S.NO |
SVG |
JPEG |
| 1. |
It stands for Scalable Vector Graphics. |
It stands for Joint Photographic Experts Group. |
| 2. |
It is a vector image. |
It is a raster image. |
| 3. |
It’s quality doesn’t decrease on zooming. |
Image quality decreases on zooming. |
| 4. |
It is made up of paths. |
It is made up of fixed no of pixels. |
| 5. |
SVG files are editable. |
JPEG files are not editable. |
6. |
Extensions used is .svg. |
Extension used are .jpg and .jpeg. |
| 7. |
Mostly used for devices with high pixel density. |
It is mostly used in photography. |
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!