GenerateIt

CSS Gradient Generator

Easily create stunning CSS gradients using this online generator. With this tool, you can design both linear and radial gradients and instantly generate the CSS code needed to use them in your stylesheets. Gradients can be used as backgrounds, overlays, buttons, and decorative elements to add depth and visual interest to your webpages.

CSS gradients can be one of the more challenging techniques to learn, especially when working with multiple color stops, angles, or gradient positions. This generator removes the guesswork by allowing you to visually build your see the gradient in real time as you make changes.

As you adjust colors, directions, and positions, the generator automatically produces all the required CSS code, ready to copy and paste into your project. To help you get started, the tool also includes several preset gradients, demonstrating common styles and effects and making it easier to understand how different gradient configurations are achieved.

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong.

Buy me a coffee

Gradient options

90°

Color stops

    Stops can be placed in any order. In the code they are always written from the lowest position to the highest, as CSS expects.

    Example gradients

    Gradient preview

    CSS code

    Copy & paste

    Everything is worked out in your browser and nothing is uploaded.

    How to use it

    The css gradient generator is a simple tool to help you visualize how a gradient will look using css code.

    1. Choose a typePick linear, radial or elliptical. Each one also has a repeating version that tiles the gradient.
    2. Set the directionFor a linear gradient, choose a direction or a custom angle. For a radial gradient, choose the size and where the center sits.
    3. Pick your colorsChange the start and end colors with the picker, or type a hex code, and move their sliders to set where each color begins.
    4. Add more stopsUse Add stop to blend in extra colors, up to 10 in total. Remove any stop you added with the bin button.
    5. Try an exampleClick any of the example gradients to load it, then change it to suit you.
    6. Copy the codeThe CSS updates as you go. Copy it and paste it into your stylesheet.

    Good to know

    A fallback color

    The first line of the code is a plain color. Browsers that cannot draw the gradient use it instead.

    Hard edges

    Place two stops at the same position, or one apart, to get a sharp line between colors instead of a blend.

    Repeating gradients

    They only tile when the stops do not cover the full 0% to 100% range. Move the end stop to about 20% to see it repeat.

    Frequently asked questions

    What is the difference between linear and radial?

    A linear gradient blends colors along a straight line, such as top to bottom. A radial gradient blends outward from a point, either as a circle or an ellipse.

    Do I still need vendor prefixes?

    No. Every current browser supports the standard linear-gradient() and radial-gradient() syntax, so the code uses it without -webkit- or -moz- prefixes.

    Why are my stops written in a different order?

    CSS expects stops from the lowest position to the highest. The generator sorts them for you, so what you see in the preview is what the code does.

    Is anything uploaded?

    No. The preview and the code are created in your browser.

    Related tools

    CSS Text Shadow Generator

    This generator will visually show you shadows that can be generated with the css property text-shadow.

    CSS Ribbon Generator

    Create simple and effective ribbon banners for headings or titles on your webpage.

    CSS Layout Generator

    This generator will create a fluid or fixed width column layout, with up to 3 columns + header, footer and menu.

    If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong.

    Buy me a coffee