A vector file stores images as mathematical instructions instead of colored dots
A vector file is a way of storing an image using math rather than pixels. Instead of saying "put a red dot here, a blue dot there," a vector file says "draw a line from point A to point B, then fill the space with red." When you open a vector file, your computer reads those instructions and draws the image fresh each time.
This is different from the image files most people work with daily. A photograph from your phone or a screenshot is a raster file — it is made of a grid of colored pixels, like a mosaic. A vector file is made of paths, shapes, and mathematical descriptions of curves. The difference matters because it changes what you can do with the file and how it behaves when you resize it.
Key Takeaways
- Vector files store images as mathematical instructions for shapes and lines, while raster files store them as grids of colored pixels.
- Common vector file types are .ai (Adobe Illustrator), .eps, .svg, and .pdf, each used for different purposes and programs.
- Vector files stay sharp and clear when you enlarge them, but raster files become blurry and pixelated.
- Vector files work best for logos, text, diagrams, and straightforward illustrations; raster files work better for photographs and complex images with many colors and details.
Why vector files stay sharp when you resize them
When you enlarge a raster file — say, a 500-pixel-wide photo — your computer has to guess what the new pixels should look like. It stretches the existing pixels or tries to fill in the gaps, and the result is blurry and jagged. A vector file has no pixels to stretch. It has instructions. When you make a vector file twice as large, your computer straightforward redraws the shapes at twice the size, using the same mathematical instructions. The result is just as sharp.
This is why logos and text are almost always stored as vectors. A company logo needs to look crisp on a business card, on a billboard, and on a website — all different sizes. A raster logo would look terrible at billboard size. A vector logo looks perfect at any size because it is being redrawn, not stretched.
Common vector file types and what they are used for
.ai is the native format for Adobe Illustrator, the most widely used professional design program. If a designer gives you a file ending in .ai, they created it in Illustrator and you will need Illustrator (or a compatible program) to edit it.
.eps (Encapsulated PostScript) is an older format that works across many programs. It was the standard for sending files to print shops and is still common in professional printing, though it is becoming less common as .pdf takes over.
.svg (Scalable Vector Graphics) is a format designed for the web. It is a text-based format that any web browser can display, and it is increasingly used for icons, logos, and straightforward graphics on websites. SVG files are also the smallest in file size.
.pdf can be either raster or vector, depending on how it was created. A PDF made from a vector file stays vector. A PDF made from a scanned document or photograph is raster. PDFs are useful because they look the same on any device and are hard to edit accidentally, which is why they are standard for contracts and official documents.
When to use vector files versus raster files
Use a vector file when you need something that will be resized, printed at different scales, or edited later. Logos, business cards, posters, diagrams, and technical drawings are all vector work. If you are designing something that will exist at many different sizes — a website icon that also appears on a t-shirt, for example — vector is the right choice.
Use a raster file for photographs, artwork with gradients and many colors, or anything that came from a camera or scanner. A raster file is also smaller in file size when it contains a photograph, because vector files would need thousands of tiny shapes to describe all the color variation in a photo.
You cannot easily convert a raster file to a vector file. Tracing software exists that can try to turn a photo into a vector, but the result is usually poor unless the original image is very straightforward. The conversion works better the other way: a vector file can be saved as a raster file (called "exporting" or "rasterizing"), though you lose the ability to resize it without losing sharpness.
What software opens and edits vector files
Adobe Illustrator is the industry standard for creating and editing vector files. It is expensive — a monthly subscription costs around $30 — but it is what most professional designers use.
Free and lower-cost alternatives exist. Inkscape is a free, open-source program that handles .svg, .eps, and other vector formats. It has a steeper learning curve than Illustrator but can do most of the same work. Affinity Designer is a one-time purchase (around $70) and is popular with designers who want to avoid subscription costs.
If you only need to view a vector file, most programs can open them. Web browsers open .svg files directly. Adobe Reader opens .pdf files. Many image viewers can display .eps and .ai files, though you cannot edit them without the right software.
The file size difference between vector and raster
A vector file is usually much smaller than a raster file of the same image, especially if the image is straightforward. A logo that is 2,000 pixels wide as a raster file might be only 50 kilobytes as a vector file. This is because the vector file only needs to store the mathematical instructions, not the color of every single pixel.
However, a vector file with hundreds of complex shapes can become large. And a photograph as a vector file would be enormous — potentially larger than the raster version — because you would need thousands of tiny shapes to describe all the color variation. This is why vector files work best for images with solid colors and clear shapes, not for photographs.
How to tell if a file is vector or raster
The file extension is the clearest clue. If the file ends in .ai, .eps, or .svg, it is vector. If it ends in .jpg, .png, .gif, or .bmp, it is raster. A .pdf could be either, so you may need to open it and look.
You can also look at the file itself. Open it in an image viewer and zoom in as far as you can. If the edges stay sharp and smooth no matter how much you zoom, it is vector. If the edges become jagged and pixelated, it is raster. This test works because vector files are redrawn at every zoom level, while raster files just show you larger and larger pixels.
Frequently Asked Questions
Can I convert a photograph to a vector file?
Tracing software can attempt this, but the results are usually poor unless the photo is very straightforward with few colors. The software has to guess which pixels should become shapes, and it often creates messy, unusable output. For photographs, raster format is the right choice.
What is the difference between .svg and .pdf?
.svg is designed for the web and works in any browser; .pdf is designed for printing and viewing documents. Both can be vector, but .pdf is more common for documents you want to protect from editing, while .svg is standard for web graphics and icons.
Do I need special software to open a vector file?
To view a vector file, you often do not — web browsers open .svg files, and most image viewers can display .ai and .eps. To edit a vector file, you need design software like Adobe Illustrator, Inkscape, or Affinity Designer.
Why is my logo blurry when I make it bigger?
Your logo is probably stored as a raster file (.jpg or .png). Raster files become blurry when enlarged because the computer stretches existing pixels. Ask the designer for the vector version (.ai, .eps, or .svg), which will stay sharp at any size.
Can I edit a .pdf file that contains a vector image?
It depends on how the .pdf was created. If it was made from a vector file, the shapes inside are still vector and can sometimes be edited in design software. If it was made from a scan or raster image, the content is raster and cannot be edited as shapes. Most .pdf files are locked against editing anyway.