A 1 px stroke can look softer than the neighboring stroke even when both have the same weight. The missing detail is where each edge falls relative to the output pixels. For a horizontal or vertical stroke at its final 1× size, put its two visible edges on pixel boundaries, then check the exported pixels.
Set up a straight 1 px stroke
- At the intended output size, select the line and set its weight to 1 px in Window → Stroke. Start with a plain opaque stroke, no effects and no rotation.
- Choose View → Pixel Preview and zoom to at least 600% to see the pixel grid. Choose View → Snap to Pixel if you want Illustrator to snap as you draw or move; its options also cover scaling. Adobe documents the snapping options and grid.
- Position the stroke so its visible edges run along two adjacent grid boundaries. For an existing object, select it and choose Object → Make Pixel Perfect; for just one horizontal or vertical segment, select it with Direct Selection first. Inspect the result: alignment may move geometry, so check the rest of the artwork too.
Pixel Preview is a guide to rasterization, not the delivered file. Check the actual export at its intended pixel dimensions and 100% view, especially if export scaling or effects are involved.
The path coordinate depends on stroke alignment
Think of pixel boundaries as 0, 1, 2 and so on, and their centers as 0.5, 1.5, 2.5. For a vertical center-aligned 1 px stroke, a path at x = 4.5 has edges at x = 4 and x = 5. Put that same path at x = 4 and its edges fall at 3.5 and 4.5, across two columns. The horizontal case works the same way on y.
For a closed shape, Window → Stroke offers Align Stroke to Center, Inside, and Outside. With a 1 px inside- or outside-aligned stroke, an axis-aligned path on an integer boundary places the two stroke edges on adjacent boundaries; which side receives the stroke depends on the option and the shape. Adobe notes that current web documents default to inside alignment, while earlier versions used center. Check the selected option instead of assuming one rule for every path. Adobe's stroke alignment guide scopes these options to closed paths; use center alignment for an ordinary open line.
These coordinates assume the grid origin and output pixels coincide, a 1× export, and no later scaling. Illustrator's pixel grid depends on the ruler origin. If your export is scaled, judge against the output grid: a 1 px source stroke exported at 2× spans two output pixels, and an additional resize can change its edges.
Check the pixels, not just the vector
In a controlled raster example, a black 1-pixel-wide rectangle on white was rendered twice with the same dimensions and settings. Its left edge was at x = 4 in the first render and x = 12.5 in the second; the second is displaced by half a pixel relative to its grid. A middle row read 255, 0, 255 around the aligned rectangle and 255, 127, 127, 255 around the shifted rectangle, with 0 black and 255 white. The shifted shape covers half of each adjacent column, so its edge is spread across two gray columns.
This is a measured SVG raster fixture, not an Illustrator screenshot or a promise of exact Illustrator channel values. Rasterizers and antialiasing settings can differ. It illustrates the geometry to look for in your own export.
A controlled SVG raster, enlarged 40× with nearest-neighbor scaling. Left: pixel-aligned; right: shifted half a pixel.
Export the artwork at the required pixel dimensions without a subsequent resize. Open the file at 100% and compare the straight stroke with its neighbors. A sharp opaque 1 px stroke on a contrasting flat background should occupy one solid row or column along its straight middle; ends and joins can behave differently. If it spans two softer rows or columns, inspect the alignment mode, visible edge positions, output scale and effects, then export again. Curves and diagonals need antialiasing and are not expected to produce the same single-column result.