SVG Rectangle Generator
Build rounded SVG rect elements with corner radius controls.
SVG Formatter
About SVG Rectangle Generator
The SVG Rectangle & Rounded Container Generator builds precision vector rectangles, pills, and cards with independent corner radiuses (`rx`, `ry`), stroke borders, linear/radial gradient fills, drop shadows, and ready-to-use SVG/JSX code.
How to Use SVG Rectangle Generator
Step 1
Set width and height dimensions in pixels.
Step 2
Adjust corner radius sliders (`rx` / `ry`) for rounded corners.
Step 3
Choose fill colors, borders, and gradients.
Step 4
Click "Copy SVG".
Practical Use Cases for SVG Rectangle Generator
Vector Card Containers & Button Plates
Design rounded vector card backgrounds, button baseplates, and frame borders for web graphics.
Custom Pill Badges & Label Banners
Generate fully rounded pill shapes (`rx="999"`) with gradient fills for category labels and notification pills.
Input & Output Examples
Generating Rounded Gradient SVG Card Plate
Width: 300px, Height: 180px, Radius: 16px, Fill: Linear Gradient (Blue to Indigo)
<svg viewBox="0 0 300 180">\n <rect width="300" height="180" rx="16" ry="16" fill="url(#cardGrad)" />\n</svg>
Key Features & Performance
- ✓Interactive controls for Width, Height, Position (`x`, `y`), Corner Radiuses (`rx`, `ry`), and Stroke Thickness.
- ✓Supports separate 4-corner rounded radiuses via SVG path conversion.
- ✓Fills: Flat Solid, Linear Gradient, Radial Gradient, and Pattern overlays.
- ✓Outputs SVG `<rect>`, SVG `<path>`, and React JSX component code.
- ✓100% Client-Side generation.
- ✓1-Click Copy SVG.
Key Terminology & Definitions
SVG `<rect>` Attributes `rx` and `ry`
The horizontal (`rx`) and vertical (`ry`) corner radii used to round the corners of an SVG rectangle.
Pill Shape (`rx = height / 2`)
Setting corner radius equal to half the container height to create a perfectly rounded stadium/pill shape.
