Circle Packing Generator

Fill a shape with circles that never overlap. The tool drops circles one at a time at seeded random points inside a rectangle, a circle, a hexagon or a triangle, and keeps each one only if it stays at least the gap you choose from every other circle and from the edge. Random sizes take the largest circle that fits at each point, up to a maximum, so big circles come first and small ones fill the spaces; size range picks a radius at random between your smallest and largest; equal makes every circle the same. It reports how many circles it placed and how much of the shape they cover. It prints at real size, filling the page or at the width and height you type. Download a PDF, a 300 DPI PNG or an SVG with every circle as a circle element, ready for laser cutters and plotters. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; nothing is uploaded.

100% private — runs in your browser

Print at 100% (Actual size): the design prints at real size. The SVG holds every circle as a circle element, ready for cutters.

Circles

Look

Size

Page

Runs in your browser with our own code: nothing you type is uploaded or saved. Every circle is placed and checked by our own code. You may use what you make here, including commercially, with no credit needed.

How to make and print a circle packing

  1. Pick a preset, or choose the shape.
  2. Choose random sizes, a size range or equal circles, and the radii.
  3. Set the gap, the most circles, the number of tries and the seed.
  4. Choose filled, outlines or both, the colour rule and the colours.
  5. Choose fill the page or a width and height.
  6. Download the PDF and print at 100% (Actual size), or the PNG or SVG.

What you can use it for

  • Laser-cut and CNC panels, screens and coasters
  • Posters, prints and backgrounds
  • Dot and bubble patterns for packaging and textiles
  • Planning holes, studs or tiles with a set gap
  • Maths and art lessons on packing and coverage
  • Vinyl and plotter art from the SVG circles

The 14 presets

PresetShapeSizesRadiusGapCirclesCoverageClosest pair (edge to edge)Closest to the edge
Square, random sizes 2 to 20 mmrectanglerandom (largest that fits)2 mm to 20 mm1 mm23567.0 %1 mm1 mm
Full page, random sizes 1.5 to 25 mmrectanglerandom (largest that fits)1.5 mm to 25 mm1 mm42269.8 %1 mm1 mm
Circle, random sizes 1.5 to 18 mmcirclerandom (largest that fits)1.5 mm to 18 mm0.8 mm29869.9 %0.8 mm0.8 mm
Hexagon, random sizeshexagonrandom (largest that fits)1.5 mm to 16 mm0.8 mm26468.8 %0.8 mm0.8 mm
Triangle, random sizestrianglerandom (largest that fits)1.5 mm to 16 mm0.8 mm18667.3 %0.8 mm0.8 mm
Size range 4 to 12 mm (random pick)rectanglesize range4 mm to 12 mm1 mm18646.6 %1.006 mm1.014 mm
Equal circles, 6 mm radiusrectangleequal6 mm1 mm15841.0 %1.002 mm1.073 mm
Laser cut: outlines only, 2 mm gaprectanglerandom (largest that fits)3 mm to 15 mm2 mm6354.8 %2 mm2 mm
No gap: circles may touchcirclerandom (largest that fits)1 mm to 20 mm0 mm71184.4 %0 mm0 mm
Many small circles, 0.8 to 5 mmrectanglerandom (largest that fits)0.8 mm to 5 mm0.4 mm2,00464.9 %0.4 mm0.4 mm
Few big circles, 10 to 45 mmcirclerandom (largest that fits)10 mm to 45 mm1.5 mm1766.2 %1.5 mm1.5 mm
Square, seed 2rectanglerandom (largest that fits)2 mm to 20 mm1 mm20470.6 %1 mm1 mm
Real size 5 x 5 in, 0.1 to 0.6 inrectanglerandom (largest that fits)0.1 in to 0.6 in0.03 in11367.0 %0.03 in0.03 in
Polka-style: 200 equal 4 mm circlesrectangleequal4 mm3 mm20023.1 %3.023 mm3.55 mm

Worked out by the tool on US Letter; the last two columns are never below the gap.

Seeds: square, random sizes 2 to 20 mm

SeedCirclesCoverageLargest radius
123567.0 %20 mm
220470.6 %20 mm
319970.0 %20 mm
423566.6 %20 mm
520069.2 %20 mm

Tries: square, random sizes 2 to 20 mm

TriesCirclesCoverage
5,00019664.9 %
20,00022566.5 %
60,00023567.0 %
200,00024467.4 %

What prints

DownloadWhat is in it
PDFThe packing at real size, every circle as a vector curve, with the count, radii, gap, coverage and a check bar
PNG 300 DPIThe same sheet as a picture
SVGEvery circle as a circle element, plus the shape outline, at real size

For a cutter that needs DXF, use SVG to DXF; to edit the outline, the SVG Path Editor.

Which tool to use

You wantUse
Random circles that never overlap, with a gapCircle Packing Generator (this page)
Touching circles by Descartes’ theoremApollonian Gasket
Equal dots on a repeating gridPolka Dot Pattern Generator
Cells around random pointsVoronoi Generator

Other tools: the Polka Dot Pattern Generator makes seamless dot repeats, and the Voronoi Generator cell patterns.

More free tools

Maths art and printables?

Drawing and print tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

What is circle packing?

Placing circles in a shape so that no two overlap. This page packs circles at random: it is not the densest packing of a given set of circles, and it does not make the circles touch each other (unless the gap is 0).

How does the tool place the circles?

It picks a random point inside the shape (from a seed), works out the room there, which is the distance to the nearest circle and to the edge minus the gap, and keeps a circle if it fits. Random sizes use the largest radius that fits, up to the maximum, and need at least the minimum. Size range picks a radius between the minimum and the maximum and keeps it only if it fits. Equal uses the maximum every time. It stops after the number of tries or when it reaches the most circles you asked for.

Is it checked that circles never overlap?

Yes. Our tests check every pair of circles on every preset: the distance between centres is at least the two radii plus the gap, to 10⁻⁹ mm, and every circle is at least the gap inside the shape. The table below shows the closest pair and the closest circle to the edge for each preset.

What is coverage?

The total area of the circles divided by the area of the shape, worked out by the tool and shown under the options and in the footer. Random sizes, which fill the spaces with smaller and smaller circles, cover much more than equal circles or a size range: compare the Coverage column in the table below.

What do seed and tries change?

The seed sets the random points, so the same settings and seed always give the same picture, and another seed gives a new one. More tries fill more of the gaps, up to the point where no more circles of the smallest size fit.

Can I use it for laser cutting?

Yes. Choose outlines only: the SVG and PDF draw each circle once as a thin line, with no fill. The gap you set is the narrowest bridge left between holes and between a hole and the edge.

Is this the same as the Apollonian gasket?

No. The Apollonian gasket fills a circle with circles that all touch, using Descartes’ circle theorem. This page places circles at random with a gap you choose, in four shapes.

Is it free?

Yes. There is no sign-up, no watermark and no limit.

Is anything uploaded?

No. Every point and circle is worked out by JavaScript in your browser. Nothing you type is sent anywhere or saved when you close the page.