Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Web & CSS

Media Query Builder & Analyzer

Generate or analyze CSS @media query conditions. Builds min-width, max-width, or width-range breakpoints with optional feature conditions, and validates pasted queries for balanced parentheses, known features, and meaningful structure.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Building a query from breakpoints

Build mode assembles @media clauses from an optional min-width, an optional max-width, and extra feature conditions, joined together with and. A feature must be a single parenthesized expression such as (hover: hover), and at least one width or feature condition is required before anything is emitted.

Reading a pasted query

Analyze mode lists every feature condition with its validity, checks that parentheses balance and stay within a sensible depth, and flags queries that carry no feature at all or that omit a comparison operator and value.

Known feature names

Width, height, aspect-ratio, orientation, resolution, pointer and hover are recognised, along with prefers-color-scheme, prefers-reduced-motion and friends. An unrecognised feature is marked for review rather than assumed valid.

Mobile-first habit

min-width favours small screens first, letting breakpoints add on as the viewport grows, while max-width suits a desktop-first cascade. Either is fine, but pick one order and keep the project consistent.

Parsed in the browser

Queries are analysed and composed entirely on-device. Nothing is sent anywhere and the tool works offline.

Questions

What makes a media query?

A media type (optional, default all) plus one or more feature conditions combined by and, or, or not.

Should I use min-width or max-width first?

Mobile-first CSS favors min-width so base styles apply to small screens and breakpoints add on. Desktop-first favors max-width.

Why balance parentheses?

Media queries nest feature expressions in parentheses; unbalanced parens make the whole rule invalid and the declaration block is dropped.

See category