Media Query Builder
Build CSS media queries for widths, heights, orientation, print and custom conditions. Test matches in a resizable viewport and export the stylesheet.
Test Responsive CSS at Breakpoint Boundaries
Media Query Builder: how to use it
- Load Two breakpoints, then set Preview width to 599, 600 and 900 pixels. Check which rules match at each boundary.
- Choose screen, print or all, set the condition and units, and edit the target class and its declarations. Arrange the rules in cascade order.
- Copy or download the selected rule or complete stylesheet.
Limits and notes
Up to 12 queries, using px, em or rem for typed dimensions. The preview uses the browser's real viewport matching and keeps entered declarations inert. Browser-dependent features match the running browser's environment. Input stays on your device.
How your privacy works →Media Query Builder: common questions
Does min-width include the exact breakpoint?
Yes. A min-width rule at 600px matches at 600px and larger. A max-width rule includes its upper endpoint.
Why do two rules match at 900px?
Minimum-width rules overlap by design. If two rules set the same property with the same specificity and importance, their stylesheet order determines the result.
What changes an em or rem breakpoint?
Media query relative units use the browser's initial font size, which can reflect user preferences. Setting a font size in the target stylesheet does not change that initial value.