Favorite places of your favorite city
Home
Add to preferred sources on Google

CSS Background Pattern Generator

Build a repeating CSS background for a page, card or section. Choose a pattern, adjust its geometry and colors, then copy the current declarations into your CSS rule.

Pattern preview

The backdrop is for preview only and is not copied.

Pattern controls

Foreground

Whole number from 0 to 100.

Background

Whole number from 0 to 100.

Pattern geometry

Enter whole numbers in CSS pixels; the stripe angle uses degrees.

Preview and CSS

22×22 CSSpx tile; 2px radius, 4px diameter.

background-color: rgba(11, 22, 35, 1);
background-image: radial-gradient(circle at 50% 50%, rgba(36, 91, 133, 1) 0px, rgba(36, 91, 133, 1) 2px, transparent 2px, transparent 100%);
background-size: 22px 22px;
background-position: 0px 0px;
background-repeat: repeat;
background-origin: padding-box;
background-clip: border-box;
background-attachment: scroll;
background-blend-mode: normal;
Pattern geometry

22×22 CSSpx tile; 2px radius, 4px diameter.

Horizontal pitch (2–256 px)
22
Vertical pitch (2–256 px)
22
Radius (1–128 px)
2

Pattern settings and CSS stay in this page. Copy occurs only when requested.

Create a background pattern

  1. Choose Stripes, Grid, Dots or Checkerboard. Each pattern keeps its own geometry when you switch, while the foreground and background colors stay shared. None gives you a plain background.
  2. Enter whole CSS-pixel values and choose both colors and their opacity. Correct incomplete or invalid fields before copying. The light or dark backing behind the specimen is only a preview aid.
  3. Inspect the current pattern and CSS, then use Copy CSS. Paste the declarations inside a CSS rule for your element. If clipboard access is denied, use the current selectable fallback in the result card.

Understand the geometry and transparency

Pitch is the distance from one repeat to the next, rather than the empty space between marks. Grid and dot patterns have separate horizontal and vertical pitches, so their spacing can be rectangular.

A stripe's period is its foreground band width plus its gap. The CSS angle describes the gradient direction: 90 degrees points right and produces vertical bands. The repeating gradient fills the positioning area without a separate rotated rectangular tile.

Dots use a circular radius in CSS pixels. The diameter is twice that radius and must fit within both tile dimensions. Checkerboard instead uses one square cell size, with two cells on each side of the complete repeating tile.

The foreground is painted over one background base. Transparent gaps reveal that base, and a translucent base reveals the element's surroundings. Grid lines use two foreground layers, so their crossings can have a different color or opacity from a single line.

The output resets the background image, size, position, repetition, origin, clipping, attachment and blend mode. Existing element opacity, filters, masks or ancestor effects can still change the final appearance. The optional geometry details explain the active values without adding preview dimensions to the CSS.

Examples to try

Start with a 24 by 24 CSS-pixel grid and one-pixel vertical and horizontal lines. The code uses two gradients over the single background color. Changing one pitch changes that repeat distance without changing the other axis.

For vertical stripes, set the angle to 90 degrees, the foreground band to 4 pixels and the gap to 6 pixels. The period along the gradient line is 10 pixels. A four-pixel band with an eight-pixel gap instead has a twelve-pixel period.

Try dots with a 20 by 12 pixel tile and a radius of 3 pixels. Each dot has a six-pixel diameter and remains circular even though the repeat distances differ. The radius is not the tile width or a percentage of the element.

A checker cell of 10 pixels produces a 20 by 20 pixel tile. If the foreground opacity is zero and the base opacity is 50 percent, the base is still painted once. The invisible foreground does not add another copy of that base.

Scope and rendering limits

This editor offers four editable pattern families and None. It does not import arbitrary CSS or images, combine an unrestricted layer stack, animate a background, rotate checkerboards or export an image file.

Geometry uses bounded whole CSS pixels. Stripe widths and gaps run from 1 to 128 pixels; grid and dot pitches run from 2 to 256. Grid strokes must be smaller than their pitch, and a dot's diameter must fit the smaller pitch. Checker cells run from 1 to 128 pixels. These are editor limits, not the full CSS grammar.

Zero opacity and matching colors are valid settings, even when a pattern becomes invisible or appears flat. They do not automatically remove its gradient declarations. None is the explicit way to request no background image.

Browser support and edge antialiasing can differ. An unavailable preview is labelled separately from a valid authored CSS result. Inspect the copied CSS in your target layout and browsers; a live specimen is not a certification of every rendering environment.

Local authoring

Pattern settings and CSS are prepared in this page without uploading content or loading a user image. There is no saved account, input-bearing share URL or automatic clipboard access. Copy runs only when you request it, and ordinary Sources links open their external documents.

Questions about CSS patterns

It copies nine background declarations, one per line, with one final line break. There is no selector or preview backing, so paste the declarations inside a CSS rule for the element you want to style.

A vertical line and a horizontal line are separate foreground layers. At their crossing they overlap. Two layers with 50 percent foreground opacity have 75 percent combined foreground opacity before the single base is considered.

The angle points along the CSS gradient line. At 90 degrees that line runs to the right, and the bands run across it. Band width and gap are measured along the gradient line.

No. Light and Dark are preview-only surroundings that help you inspect transparency. The authored background color and its opacity are copied; the backing is not.

Yes. Set the background opacity to zero. Transparent gaps then reveal the target element's surroundings. The foreground can also be transparent, and valid invisible patterns remain copyable.

No. Stripes have a gradient-angle control; grids, dots and checkerboards keep their specified axes and centers. This editor authors the supported patterns from its controls and does not parse arbitrary CSS.

The old attempt loses ownership of the result. It cannot bring back an outdated success message or manual fallback after the active settings, pattern or language change.

Sources

These specifications describe the CSS and clipboard behavior used by this tool.

Specifications reviewed 17 November 2026; draft status and browser support can change.

CSS Filter Generator

Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.

Open tool — CSS Filter Generator

Fluid Font Size Calculator

Create root-relative CSS from viewport endpoints and inspect the copied size model.

Open tool — Fluid Font Size Calculator

CSS Button Generator

Style native button states, inspect keyboard focus and copy HTML and CSS.

Open tool — CSS Button Generator

CSS Border Generator

Create borders with independent styles, widths, colors and opacity on all four sides.

Open tool — CSS Border Generator

CSS Clip Path Generator

Edit polygon points and basic shapes, preview the clipping and copy CSS.

Open tool — CSS Clip Path Generator

CSS Border Radius Generator

Edit eight corner radii, preview a box and copy CSS in pixels or percentages.

Open tool — CSS Border Radius Generator

CSS Grid Generator

Build a bounded CSS Grid example with editable tracks, placement and named areas. Preview it, copy CSS or HTML and download the same standalone example.

Open tool — CSS Grid Generator

CSS Flexbox Generator

Build a Flexbox example with container and item controls, explicit layout axes, matching CSS and HTML, and a local complete-example download.

Open tool — CSS Flexbox Generator

CSS Text Shadow Generator

Build ordered text shadows, preview plain text and copy exact CSS.

Open tool — CSS Text Shadow Generator

CSS Transform Generator

Compose repeatable 2D CSS transforms, edit px or percentage translation and origin, inspect a reference box and copy the exact current declarations.

Open tool — CSS Transform Generator

CSS Cubic Bezier Generator

Edit CSS cubic-bezier curves with coordinates, visual handles and presets. Inspect overshoot, run a deliberate comparison with linear motion, and copy easing CSS.

Open tool — CSS Cubic Bezier Generator

CSS Box Shadow Generator

Create ordered CSS box-shadow layers with a live preview and copyable code.

Open tool — CSS Box Shadow Generator

HTML to Markdown

Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.

Open tool — HTML to Markdown

JavaScript Regex Tester

Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.

Open tool — JavaScript Regex Tester

Markdown to HTML

Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.

Open tool — Markdown to HTML

CSS Gradient Generator

Create linear or radial CSS gradients with editable colors, opacity and stops.

Open tool — CSS Gradient Generator

Color Converter

Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.

Open tool — Color Converter

HTML Entity Encoder/Decoder

Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.

Open tool — HTML Entity Encoder/Decoder

Markdown Table Generator

Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.

Open tool — Markdown Table Generator

HTML Table Generator

Build a rectangular table with captions and headers, then copy HTML and CSS.

Open tool — HTML Table Generator

Query String Parser & Builder

Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.

Open tool — Query String Parser & Builder

URL Encoder & Decoder

Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.

Open tool — URL Encoder & Decoder

Color Contrast Checker

Compare foreground and background colors, adjust opacity and check WCAG numerical contrast thresholds for text and essential interface details.

Open tool — Color Contrast Checker

Base64 Encoder & Decoder

Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.

Open tool — Base64 Encoder & Decoder
View all tools in this category