What to do with the Eraser tool?

Most posts on Illustrator tools focus on the things they can do. I’m going to focus on what a tool can’t do.

The eraser attracts new users because it seems like it should be familiar from pixel-based software like PhotoShop and Paint. You draw things, you erase things — simple, right? But then of course the eraser becomes a large source of frustration, because it doesn’t work as you might expect. The reasons for this are found in some fundamental ways in which Illustrator works, which I’ll also go into. But first, a few scenarios where you might think an eraser tool would be useful.

Erase rounded path ends or mitered corners

Sometimes you’ll end up with path end caps protruding from the edge of your illustration, or an excessive miter jutting out that you’d like to lop off, and need a way to shave them.

Erase part of an art brush

Illustrator comes with a bunch of nice painterly brushes, but sometimes you’re going to want to cut back into them and selectively erase long tails or otherwise neaten them up. Maybe you’re used to doing similar things in PhotoShop.

Erase the stroke on one side of a square

Probably a common thought: how can I get rid of only one side of a square, or part of another shape? Seems logical to just erase it, right?

Some bad news

The bad news is that the eraser tool can’t do any of these things! Not exactly as described, anyway.

You might justifiably ask: what is the point of it then? What can it do? The answers will be, I’m afraid, disappointing for most. But first I’ll discuss why it can’t do these things. As I said earlier, it involves a core concept in Illustrator: the difference between Objects and Appearances.

Objects and Appearances

If you use Outline mode (found under the View menu, or Command/Control + Y), Illustrator presents you with the skeleton of whatever you’re drawing.

It’s a series of paths that have no visual information except a pixel-width line. The things you can no longer see are called appearances — everything you might find listed in the Appearance panel when you select an object. Consider this brush as another example:

The actual object here is the path going through the centre of the brushstroke; the brush itself is an appearance. What else is an appearance? Well, pretty much everything except the path: a fill, a stroke, a pattern brush, and a 3D extrude effect are all appearances. Almost everything you can see in Illustrator’s regular view mode (Preview) is an appearance.

As far as Illustrator is concerned, appearances aren’t ‘real’ objects — they only exist in relation to the path they’re applied to, and change dynamically as the object is moved or edited. You can nail them down by ‘expanding’ them, after which they become ‘real’ objects and can in turn have their own appearances applied. If I expand the brush above, I can then apply a brush to the outline of the brush, for instance.

How does this relate to the capabilities of the eraser? You might have already guessed, but just in case:

The eraser tool affects paths, not appearances.

It can’t affect a brush, a miter on a stroke, a rounded end, or anyting else that isn’t a path. You could erase parts of the underlying path in each of those situations, but the appearance would just be redrawn to match the new path. Let’s consider a few situations that commonly result in confusion for new users.

Problem 1: The eraser tool doesn’t erase my path cleanly

When you drag the eraser over a path, it creates a nice clean break — exactly what you’d expect from pixel software. But then you let go, and the nice clean break vanishes! It should be fairly clear what’s happened here from the second image. Your original path is quite thick and has rounded ends. The eraser has cut the path in two — and now you have two paths that have the same appearance as he first, including the rounded ends that encroach on the break you made.

This will also be true if you try and erase part of a path that has a brush applied:

Run the eraser through the centre of this path with an art brush applied, and you now have two shorter paths each with the same complete brushstroke.

Problem 2: The eraser draws on my objects!

You scrub over a filled object with the eraser, but it ends up like the image on the left. What’s up with that? Just as before, the eraser is gouging out sections of an object that has a thick black stroke and a magenta fill applied. Where it bisects the object, it’ll create other objects with the same stroke and fill, so it’ll almost appear to be creating things rather than erasing them.

There’s a quirk of this in that it affects closed objects without a fill in the exact same way — so it seems like you can draw in completely blank space with the eraser, if it’s inside a shape with a stroke applied! This was created just by scribbling in the centre of the square with the eraser:

You can see what’s happening if I apply color to the result (right): it’s created a compound path from the ‘erased’ part, and the central part inherits the stroke from the original object.

Problem 3: The eraser closes my paths!

This only occurs if the original path has a fill (in this case a white fill). This is a common situation for new users because most Illustrator document profiles have a default graphic style that is a black stroke and white fill, and you might not notice the white fill unless you’re drawing on top of something. This is what the path looks like if we change the fill to red:

For some reason, instead of creating two open paths with the same fill and stroke, using the eraser unexpectedly closes the paths. I can’t think of a reason this would be desirable, but there it is.

So what is the eraser good for?

Very few situations, in my opinion. The common reasons a user might reach for the eraser tool in other software are best dealt with in Illustrator by masking, or as a last resort expanding appearances and directly editing them (but you’d better be certain that’s what you want before you do it).

If you’re dealing with objects that have a simple fill and no stroke or other appearance attributes to worry about, you might find it intuitive and simple to use the eraser. For instance, if you commonly paint with the blob brush, you might find the eraser a suitable counterpart. The blob brush is sort of like an eraser in reverse: it paints filled shapes with a calligraphic brush, which you could then cut back into with the eraser in predictable ways.

If you have an object selected, the eraser will only work on that, so it might be nice to neaten up your colouring under linework (if you have nothing selected, it’ll work on everything, so take care). But really, that’s about it.

Illustrator and Pixels

This will start out somewhat broad, but my main focus here is on those who are having trouble getting the pixel images they want out of Illustrator. There are many examples I’ve come across over the years of people having difficulty getting images out of Illustrator at the ‘correct’ size, especially in relation to PPI. It’s a common problem not because the users are at fault, but because Illustrator hides a key factor from them.

I’ll try and start at the beginning.

Vector and raster

These are the two primary ways of defining visual information using computer software. Basically for our purposes, “vector” means something is defined by coordinates, and lines or curves joining those coordinates. The coordinates are called anchor points, and the curves are called beziers. The curves are defined by control handles extending from the anchor points (longer handles mean more extreme curves).

An image of a bezier curve featuring anchor points and control handles in Illustrator, with annotations

“Raster” means something is defined by a grid. Within the grid, each square (or pixel) is assigned a colour value, and an image emerges from the arrangement of squares. This is the same curve as above, but the grid of pixels is much larger to make the construction more obvious:

A raster image of a curve, scaled up so that pixels are visible

In this case, the colour of each pixel varies from black to grey to white to give the illusion of a curve. There are roughly 50 pixels in each dimension, enough to describe basic shapes, but not much use for anything more detailed.

The point of this distinction between images defined by vectors and images defined by a grid is that you can make the vector image much larger and it’ll look just as detailed. If you make the grid image much larger, you’ll end up with larger grid squares. Here’s the same curve, the vector version on the left and the raster on the right:


This isn’t really a fair distinction, but it is the impression many people have when comparing the two image types. It’s not entirely fair because virtually everything you produce in software ends up as raster of some sort. Vector software is really just another way of producing raster images.

Think of the end products of your work: if you are designing something for print, your vector image will be translated by the printer software into a grid that the printer itself represents in tiny ink dots. If you’re exporting a PNG or a JPEG, your vector image becomes raster at that point. Even if your image will always be viewed on screen as a PDF or an SVG or some other format, your computer monitor is a grid of pixels performing rasterisation. Vector and raster are most often two different points in the same process, rather than different processes entirely.

So why might you start the process with one over the other if both usually end up at the same point? For raster, there are many image types that are just more efficiently represented as pixels than vectors. You might think of a set of vector shapes as paper cutouts placed on top of one another. To create a really detailed image, you might need many thousands of complex paper cutouts, to the point where the image is much more mathematically complex than a grid of pixels, even millions of pixels. Thus, realistic photos are almost always easier to represent with pixels than vectors.

The main point of vector files is that they can be the source of many different sizes of raster output. From a single vector drawing, you could output a 16×16 pixel favicon, a 500×500 company logo for a website, and a 2 metre wide banner.

Illustrator’s Units

I mentioned earlier that every anchor point in Illustrator is defined by coordinates. Those coordinates are based on a unit of real-world size: the point. This is the same point you use to define the size of type, and as far as modern software is concerned, a point is 1/72 of an inch. The actual unit Illustrator uses is vastly smaller than that (I don’t actually know the accuracy limit, but there is one), but it is some tiny fraction of a point. If you set the units in Illustrator to something else like centimetres, it’s still converting those from fractions of a point behind the scenes.

This is still the case if you tell Illustrator to use pixels as your unit.

This is a crucial point to remember. If you’re following this, you might be aware that a pixel is not a unit with a definite size. Your monitor might have 1080 rows of pixels from top to bottom, but it could also be a 13-inch laptop screen or a 60-inch TV with the same amount. If you have a pixel image, you can still scale if as we did above, so each pixel is much larger or smaller than it was originally defined.

Illustrator does not care about any of this. When working within Illustrator, a pixel is exactly the same thing as a point — 1/72 of an inch.

The reasons for this are historical, and outside my scope. But this is what we have to work with.

Pixels Per Inch and Dots Per Inch (PPI and DPI)

You may have heard one or both of these terms used in reference to pixel images, because they’re used almost synonymously, but Pixels Per Inch is what we are concerned with. It means, perhaps obviously, the number of pixels in each row of an inch. DPI is primarily a printing term, referring to printer dots per inch, and strictly speaking is irrelevant here, but people do use it to refer to the same thing as PPI on occasion. In the below example, 1 inch is 10 pixels across, resulting in a resolution of 10 PPI:

A representation of 10 pixels per inch

Of course, it’ll only be actually one inch across if you have a particularly small monitor, but I’m not in control of that.

Illustrator, therefore, uses a resolution of 72 PPI if you work in pixels. This doesn’t mean that your work is 72 PPI within Illustrator – as vectors, your work is independent of resolution – but that if you were to export a file one inch square at 100% size, that image would be made up of 72×72 pixels.

Pixels and Physical Sizes

In the requirements for image sizes for either print or screen use, you might see three variables used: the pixel-by-pixel size (“500 x 300”), the resolution (“300 PPI”), or the physical size (“4.23 x 2.54 cm”).

All of these are interdependent:

  1. If you know the pixel size and the resolution, you know the physical size (if an image is 300 pixels tall and 300 PPI, it can only be one inch tall).
  2. If you know the resolution and the physical size, you know the pixel size (a one-inch tall image at 300 PPI is 300 pixels high)
  3. If you know the physical size and the pixel size, you know the resolution (a one-inch tall image that is 300 pixels high has 300 PPI).

Generally speaking, if you’re making something for on-screen use, you don’t need a physical size. Only the pixel dimensions are important, because they’re the only things relevant to a screen (because an inch might be made up of any number of pixels on different screens). This means PPI isn’t necessary either, because without a physical size, there is no way to define it.

If you’re going to be printing something, you need the physical size and the resolution. We’ll go through scenarios for both of these.

A Raster Image for Print

Usually if you’re printing, you’ll want to supply a PDF or the AI file itself to the printer, so that the printer itself can perform the rasterisation at its native resolution. But occasionally, you may need to produce a raster file at a specific physical size (for example, to supply a rather inflexible online service). Sometimes, these requirements can seem at odds with what Illustrator can produce — if, for instance, you’re asked for a 5000 x 3000 JPEG file at 300 PPI.

Logically, you might then create a new file, select pixels as your unit, and enter 5000 and 3000 for the height and width.

Illustrator new document settings for a 5000 x 3000 pixel image
‘Raster Effects’ refers to the resolution of effects such as drop shadows — it has no effect on any overall ‘document resolution’

Then, you might go to Export As… and select 300 PPI.

Illustrator export settings for a 300 PPI JPEG

But if you check the resulting file in Bridge or Photoshop, you’ve created something vast!

Image Size infornmation in Photoshop

20834 x 12500 pixels! That’s a huge image, and far larger than you intended. What has happened here?

Remember the relationship between physical size, pixel size, and resolution. We can work out that a 5000 x 3000 pixel image at 300 PPI must be 16.666 x 10 inches. But that’s not what we’ve ended up with — that image is 69.44 inches wide. What’s happened is this:

Because of the relationship between points and pixels, Illustrator has already defined a physical size.

When you create a document 5000 pixels wide in Illustrator, you’ve created one 69.44 inches wide. This is because Illustrator assumes there are 72 pixels to an inch. There’s nothing you can do to change this inner working; you just need to be aware of it if you’re producing anything in pixels.

When you export that document at 300 PPI, Illustrator isn’t exporting a 5000 pixel image, it’s exporting a 69.44 inch one. 69.44 inches at 300 PPI is 20834 pixels — the number we see in the resulting image above. We could even go so far as to state the following:

Illustrator has no concept of pixels. A ‘pixel’ in Illustrator is just a point in disguise.

What do we need to do, then, to create an image of 5000 x 3000 pixels at 300 PPI? We need to apply what we know:

  1. There are only physical units in Illustrator
  2. If we know the pixel size and the resolution, we know the physical size

All we need to do is divide the pixel dimensions by 300 to get the dimensions we need in inches. This means we want a document of 16.666 x 10 inches. This, therefore, should be the starting point, not the pixel dimensions.

If you create a document of those dimensions and then export using 300 PPI, you should end up with a 5000 x 3000 pixel size.

A Raster Image for Screen

So what about a situation where you simply want a pixel dimension? Should you use pixels as a unit in Illustrator then?

The answer is yes — as long as you export at 72 PPI.

This means that the dimensions you use as your Illustrator document will be the same as those that export. The PPI itself is irrelevant — all you want are those pixel dimensions to be correct.