Tailwind Breakpoint Checker
Tailwind Breakpoint Checker reads your current browser viewport width and tells you which of Tailwind's five default breakpoints — sm, md, lg, xl, or 2xl — it currently falls into. Resize your window and watch the active prefix update live, alongside a full list of every breakpoint's pixel threshold and a copyable utility-class example for the range you're in right now. Handy the moment you're staring at a broken layout and need to know which Tailwind prefix actually applies to what you're seeing. Run your input through the free color gamut checker to get a detailed breakdown in seconds.
Active Breakpoint
All Breakpoints
Utility Class Example
Ever resized your window a dozen times trying to figure out which Tailwind breakpoint checker label should be active — only to lose track of whether you're looking at md or lg territory? This tool gives you live breakpoint detection with instant, real-time readout of your current viewport size and the exact active breakpoint prefix, so every responsive design decision you make is grounded in fact rather than guesswork. Whether you're troubleshooting a template that looks off on tablet or confirming that a layout change kicks in at the right screen width, having a reliable breakpoint display removes the friction from frontend development entirely.
What the Tailwind CSS Breakpoint Checker Tells You About Your Current Viewport
How the Checker Surfaces Active Breakpoint Information for Responsive Design
The tool works by reading your window's window.innerWidth against Tailwind's css framework breakpoint scale and reporting the current breakpoint in real time. As you resize your window or rotate a device, the breakpoint indicator updates immediately — no page reload, no manual calculation. Think of it as a lightweight, always-visible indicator sitting in the corner of your workflow, equivalent to a floating overlay in a devtools extension but built directly into this page. Run your input through the pixel ratio checker to get a detailed breakdown in seconds.
For a frontend developer building adaptive user interfaces, this kind of live inspection removes the cognitive load of mentally mapping pixel widths to breakpoint names. You can confirm that a md:flex class activates at exactly the right moment, verify that a lg:grid-cols-3 change fires when the window crosses the lg threshold, and catch any missing prefix errors before they reach a release checklist review.
A tailwind breakpoint viewer like this is especially valuable during localhost testing, where you can't rely on devtools device emulation alone. The breakpoint detection is dynamic — it responds to every window resize event, giving you a real-time update every time the window grows or shrinks, with the currently active prefix label always reflecting the current state. This kind of live detection is what separates a purpose-built detector from guessing in the dark.
Default Tailwind Breakpoints at a Glance — Minimum Widths and Media Queries
Tailwind CSS ships with five preset thresholds, each corresponding to a named breakpoint prefix you use directly in your HTML classes. These are inspired by common device resolutions and form the standard scale of the framework's breakpoint system. Every utility class — from spacing utilities and grid utilities to structure helpers like flex and even things like letter spacing or cursor styles — can be prefixed with any of these to make it conditional on the viewport size.
The table below maps each prefix to its lower bound in both rem and px, along with the exact generated rule. Understanding this mapping is fundamental to predicting which utility classes are active at any given window width — a core concern in web development and web design:
| Breakpoint Prefix | Minimum Width (rem) | Minimum Width (px) | Generated CSS Media Query |
|---|---|---|---|
sm | 40rem | 640px | @media (width >= 40rem) { ... } |
md | 48rem | 768px | @media (width >= 48rem) { ... } |
lg | 64rem | 1024px | @media (width >= 64rem) { ... } |
xl | 80rem | 1280px | @media (width >= 80rem) { ... } |
2xl | 96rem | 1536px | @media (width >= 96rem) { ... } |
So when the tool reports md as your currently active prefix, you know your window width is between 768px and 1023px — md:-prefixed utilities apply. When it shows lg, you've crossed the lg threshold (width >= 64rem), and lg-prefixed classes fire. The same logic applies at sm (width >= 40rem), xl (width >= 80rem), and 2xl (width >= 96rem). Below the sm threshold — on small screens — no prefix is active; you're in the unprefixed, mobile-first zone.
This scale is defined in rem units so that it respects user font-size preferences. The conditions width >= 40rem, width >= 48rem, width >= 64rem, width >= 80rem, and width >= 96rem are the exact thresholds Tailwind uses. These represent the responsive utility variants that power the entire prefix system. Keeping these in memory — or having a breakpoint checker surface them automatically — is essential for efficient adaptive development.
How Tailwind's Mobile-First Breakpoint System and Responsive Prefixes Work
Targeting Mobile Screens First Without a Responsive Prefix
Tailwind CSS takes a mobile-first approach to responsive layout, meaning base utilities apply at every window width — they form your starting point for small screens. Only when you add a prefix like sm:, md:, lg:, xl:, or 2xl: does a utility become conditional on a lower bound. The display specs report online runs entirely in your browser — nothing you enter is ever sent to a server.
This approach is the same min-width strategy recommended for hand-written style rules. The practical implication: don't think of sm: as "for small screens." Think of it as "at the sm threshold and above." On a phone, you style with unprefixed classes. As the window grows, prefixed overrides layer in. To implement a compact arrangement that becomes a side-by-side display on medium windows, you'd write:
<!-- Stacked on mobile, side-by-side from md upward -->
<div class="flex flex-col md:flex-row">
<!-- ... -->
</div>Without the viewport meta tag in your document's <head>, this prefix behavior won't function correctly on actual mobile devices — the window won't scale to the device width, and your thresholds will fire at unexpected points:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />The checker tool above will show the current prefix based on your actual window width in pixels. If you're on a phone and the indicator doesn't reflect a narrow-window state (i.e., it shows md or higher when you expect no prefix), a missing viewport meta is often the culprit.
Applying TailwindCSS Styles at a Single Breakpoint Using Max-Width Variants
Prefixed utilities in Tailwind apply from a threshold upward by default — that's the and above behavior. But sometimes you need a utility to apply only within a specific range, or only at one step. Tailwind provides max-* variants for exactly this purpose, generated automatically for each named threshold:
max-sm— applies when window width is below 40rem (below sm)max-md— applies below 48rem (max-md variant)max-lg— applies below 64rem (max-lg variant)max-xl— applies below 80rem (max-xl variant)max-2xl— applies below 96rem (max-2xl variant)
To target a single step — for example, only md and nothing above — combine a min variant with a max variant by stacking them. This is called targeting a single range using a stack:
<!-- Only applies flex at md, not at lg and above -->
<div class="md:max-lg:flex">
<!-- ... -->
</div>For targeting a broader window — say, from md through everything below xl — stack a standard prefix with a max variant:
<!-- Flex from md up to (but not including) xl -->
<div class="md:max-xl:flex">
<!-- ... -->
</div>This is where the checker becomes invaluable: resize your window and watch the indicator flip between prefix labels. You can immediately confirm whether your max-sm variant or max-md variant logic is active at the right pixel width. These are upper-bound constraints applied in a mobile-first context — useful when diagnosing a responsive layout where a class should only fire in a limited window of dimensions.
Using Arbitrary Values for One-Off Breakpoints Without Modifying tailwind.config
When you need a conditional threshold that doesn't fit neatly into the standard scale — a true one-off point — Tailwind supports arbitrary values using bracket syntax with the min variant or max variant. This lets you generate a custom breakpoint on the fly without touching your config:
<!-- Apply text-center only from 320px and above -->
<div class="min-[320px]:text-center max-[600px]:bg-sky-300">
<!-- ... -->
</div>Here, min-[320px] and max-[600px] are fully valid arbitrary values that Tailwind's JIT engine generates on demand. This is the arbitrary bracket syntax — great for adaptive interfaces with unusual inflection points tied to specific device resolutions or a unique component requirement that fits your css utilities approach. The checker above will still show you the named prefix that's active alongside your current window width, helping you decide whether an arbitrary value is the right choice or whether a named threshold from the standard scale suffices.
Worked Example — Mobile-First Card Component with Breakpoint Prefix Verification
Here's a practical worked example showing a marketing card component built using css utilities. It uses base classes as the mobile foundation and layers in md: and lg: overrides. When you resize your window to tablet width and the checker shows md as the currently active prefix, you'll know exactly which utility changes kick in:
<div class="mx-auto max-w-md overflow-hidden rounded-xl bg-white shadow-md md:max-w-2xl">
<div class="md:flex">
<div class="md:shrink-0">
<img
class="h-48 w-full object-cover md:h-full md:w-48"
src="/img/building.jpg"
alt="Modern building architecture"
/>
</div>
<div class="p-8">
<div class="text-sm font-semibold tracking-wide text-indigo-500 uppercase">
Company retreats
</div>
<a href="#" class="mt-1 block text-lg leading-tight font-medium text-black hover:underline">
Incredible accommodation for your team
</a>
<p class="mt-2 text-gray-500">
Looking to take your team away? We have the list.
</p>
</div>
</div>
</div>When this tool shows no prefix (below the sm threshold), the outer div is display: block and the image fills the full width — a classic compact arrangement. Once you cross 768px and the indicator flips to md, md:flex activates, the flex container becomes horizontal, and md:h-full md:w-48 constrains the image to a fixed sidebar width. On large windows (lg threshold+), you could stack additional lg:-prefixed overrides to refine the structure further. This is utility-driven web design at its most readable — all logic lives in inline markup, with no separate hand-written style rules or raw conditional queries.
Customizing and Extending Responsive Breakpoints in Your Tailwind Config
Overriding Default Breakpoints in tailwind.config to Match Your Design System
The preset thresholds are a starting point, not a constraint. You can fully customize the threshold configuration in your tailwind.config.js by modifying the theme.screens object. To extend without losing the presets, use theme.extend.screens — this preserves sm md lg xl 2xl while adding your custom entries. To replace all thresholds entirely, write directly to theme.screens:
// tailwind.config.js — extend defaults
module.exports = {
theme: {
extend: {
screens: {
'xs': '480px', // xs breakpoint
'tablet': '960px', // tablet breakpoint
'3xl': '1792px', // 3xl breakpoint
},
},
},
};If you need to remove preset entries — say, stripping out 2xl from your project — you can reset individual entries to initial in newer Tailwind v4+ config via CSS theme variables, or set them to undefined in the classic config. Trimming unused thresholds keeps your class names readable and your generated output lean.
Keep your custom thresholds documented in your team's design tokens. A component library with undocumented threshold ordering leads to inconsistent adaptive arrangements across components. Always use the same unit — Tailwind uses rem for its preset scale, so custom additions should also use rem to avoid sorting issues that cause a prefix to override logic in unexpected ways.
Adding Named Custom Breakpoints — A tablet Breakpoint Worked Example
Here's a complete worked example: adding a tablet threshold at 960px using theme.extend.screens, then applying it as a utility class in an adaptive component for a better responsive layout:
// tailwind.config.js
module.exports = {
theme: {
extend: {
screens: {
'tablet': '960px', // custom tablet threshold — between md (768px) and lg (1024px)
},
},
},
};<!-- Use your custom breakpoint prefix just like any built-in one -->
<div class="flex flex-col tablet:flex-row">
<aside class="w-full tablet:w-64">Sidebar</aside>
<main class="flex-1">Content</main>
</div>After adding this, the tailwind css breakpoint checker above will reflect the named prefix correctly if it's configured to recognize your custom scale. The key insight for threshold testing: always confirm that tablet:flex-row activates at exactly 960px — not at 768px (md) or 1024px (lg). Resize your window to 959px, verify the checker shows the prefix before tablet, then push to 960px and watch the change trigger. This is live testing at its most efficient.
You can also target arbitrary values directly in markup without a config entry using the bracket syntax — for example, min-[900px]:grid-cols-3 for a truly one-off threshold. These arbitrary values are especially useful in adaptive template development when you need a pixel-perfect inflection point that doesn't belong in your global configuration.
What Are Container Queries and How Do They Differ From Viewport Breakpoints?
Container queries represent a shift in how you think about adaptive styles. Rather than responding to the overall window width, they respond to a parent element size — the element's own dimensions. This means a component can adapt based on its own available space, making it truly portable and reusable across different screen dimensions and structural contexts.
This is a modern styling feature — part of the broader evolution of conditional rules into something more component-aware. In Tailwind, you mark a parent element as a container using the @container class, which sets it as an inline-size container. Child elements then use container query variants like @sm variant, @md variant, @lg variant, and @xl variant to apply styles based on that element's width:
<div class="@container">
<div class="flex flex-col @md:flex-row">
<!-- Stacks vertically until the @container is at least 28rem (448px) wide -->
</div>
</div>The practical difference from window-based thresholds is profound for reusable components: a sidebar card that switches from a compact arrangement to a side-by-side display doesn't need to know its position in the page — it just responds to its own container width. This makes UI components genuinely self-contained, improving frontend modularity across your design workflow.
Using Max-Width Container Queries, Named Containers, and Container Query Ranges
Just as Tailwind provides upper-bound variants for window thresholds, it provides equivalent max-width container queries. Use variants like @max-sm and @max-md to apply styles when a container is below a certain dimension — making max-width container queries the container-query equivalent of upper-bound ranges:
<div class="@container">
<div class="flex flex-row @max-md:flex-col">
<!-- Row layout until container shrinks below 448px, then stacks -->
</div>
</div>For container query ranges — applying a style only within a specific container dimension window — stack a regular container query variant with a max-width container query variant:
<div class="@container">
<div class="flex flex-row @sm:@max-md:flex-col">
<!-- flex-col only between @sm and @md container widths -->
</div>
</div>For complex UI design with multiple nested containers, use named containers to target a specific ancestor rather than the nearest one. Name a container with @container/main and reference it using variants like @sm/main:
<div class="@container/main">
<div class="@container/sidebar">
<div class="flex flex-row @sm/main:flex-col">
<!-- Responds to /main container, not /sidebar -->
</div>
</div>
</div>Advanced: Container Query Units (cqw, cqi, cqb, cqh)
Container queries also unlock container query units — length values relative to the container rather than the window. The most commonly used are:
cqw— 1% of the container's inline (width) dimension (cqw units)cqi— 1% of the container's inline size, synonym of cqw for inline-size containers (cqi units)cqb— 1% of the container's block dimension (cqb units)cqh— 1% of the container's height
Use these as arbitrary values in any utility class. To access block-dimension units like cqb, you need a size container — mark the parent with @container-size instead of @container. This is the distinction between an inline-size container and a full-size container, and it matters for dimension-relative calculations:
<div class="@container-size">
<div class="h-[50cqb] w-[50cqw]">
<!-- 50% of container height and width -->
</div>
</div>Tailwind's built-in container size reference spans from a 256px element (16rem, variant @3xs) up to a 1280px element (80rem, variant @7xl), giving you a full range of steps without touching your config. You can also add a custom entry — for example, an 8xl at 96rem — via the --container-* theme variables. The @container approach enables a truly utility-first, component-centric adaptive strategy that goes beyond what window-only thresholds can achieve.
Container Query Layout Worked Example — Verifying with the Breakpoint Checker
Here's a complete container query example. Notice that the child element's behavior depends on the parent element size, not on the overall window width — so the tailwind breakpoint checker indicator won't directly show you the @md variant firing. Instead, you verify container query behavior by inspecting the parent's rendered width in developer tools:
<!-- Parent marked as @container -->
<div class="@container mx-auto max-w-xl border rounded p-4">
<div class="flex flex-col @md:flex-row gap-4">
<img
class="w-full @md:w-48 object-cover rounded"
src="/img/product.jpg"
alt="Product"
/>
<div class="flex-1">
<h3 class="text-lg font-semibold">Product Name</h3>
<p class="text-sm text-gray-500">Product description goes here.</p>
</div>
</div>
</div>When the @container wrapper is wider than 448px (the @md variant threshold), the child switches from flex-col to flex-row. This fires regardless of the overall window width — you could place this card in a narrow sidebar at 1400px window width and it would still use the compact arrangement because the parent's own dimension is narrow. This is the power of container queries over traditional tailwind breakpoints: styles respond to available space, not the full display width. For threshold testing across multiple devices and structures, combining both the window-based indicator and container-aware inspection gives you complete coverage of your adaptive UI.
Frequently Asked Questions About Tailwind Breakpoints and Custom Breakpoints
Is Tailwind CSS mobile-first?
Yes. Tailwind is fully mobile-first. All base utilities apply at every window width — they're your starting point for small screens. Prefixes like sm:, md:, lg:, xl:, and 2xl: apply from that threshold upward, following a min-width approach. This is the same strategy used in css frameworks like Bootstrap. The mobile-first model means you implement the compact arrangement first, then use prefixes to layer in changes as the window grows. The checker tool confirms this — below the sm threshold, no prefix is shown because the base unprefixed utilities are in play.
What are Tailwind's default breakpoints?
Tailwind CSS ships with five preset thresholds: sm (width >= 40rem), md (width >= 48rem), lg (width >= 64rem), xl (width >= 80rem), and 2xl (width >= 96rem). These align with the sm md lg xl 2xl naming scheme used throughout the framework. Each generates a min-width conditional rule — for example, width >= 40rem for sm, width >= 48rem for md, and so on. There is no built-in xs entry in the preset scale, though you can add one via theme.extend.screens. The 3xl step is also not included by default but is a popular custom addition. The prefixes map directly to these window widths, and the indicator above reflects whichever prefix is active at your current viewport size.
How do I add a custom Tailwind breakpoint?
Use theme.extend.screens in your tailwind.config.js to add a named threshold without losing the presets. For example, adding a laptop or desktop entry with a specific pixel value makes it available as a prefix in your markup — e.g., laptop:grid-cols-4. You can also define upper-bound variants for descending ranges. Use theme.screens directly if you want to replace all presets. Always document your custom thresholds as design tokens for your team, and always use consistent units throughout to preserve correct ordering. After adding a custom entry, this responsive tester may not show your custom label by name, but it will display your current viewport size so you can confirm when the threshold is crossed.
What are container queries and when should I use them?
Container queries let you apply styles based on a parent element size rather than the overall window width. In Tailwind, you mark a parent with the @container class (making it an inline-size container), then use variants like @sm variant, @md variant, @lg variant, and @xl variant on children. Use container queries when building portable and reusable components that appear in multiple structural contexts — sidebars, grids, and modals — where the window width isn't a reliable proxy for available space. Upper-bound container query variants (@max-sm, @max-md), ranged container queries, and named containers give you full control over element-relative styling. Use container query units like cqw, cqi, and cqb to size elements proportionally to their container rather than to the overall window. This is modern, expressive front-end development at its best.
How do I test breakpoints across multiple devices efficiently?
The most efficient approach is to open your project in a responsive tester or multi-device preview tool showing multiple window widths simultaneously — one per Tailwind threshold. This lets you see phone, tablet, and desktop arrangements side by side with hot reload, so every utility class change is verified everywhere the moment you save. Combined with the tailwind breakpoint checker above for individual-viewport inspection, you have a complete threshold-testing workflow. Always run through a release checklist: confirm every preset threshold, check all custom entries, verify container queries in context, and capture screenshot evidence for your adaptive arrangements. Tools like devtools device emulation, dedicated panels, and extension-based indicators available on the Chrome Web Store all complement this workflow for thorough multi-device testing and UI verification.
Frequently Asked Questions
- What are Tailwind's default breakpoints?
- In Tailwind CSS v3, the five default breakpoints are: sm (640px), md (768px), lg (1024px), xl (1280px), and 2xl (1536px). Tailwind v4 adds an xs breakpoint at 480px. All breakpoints use min-width media queries, making the framework mobile-first by default.
- Is Tailwind CSS mobile-first?
- Yes. Unprefixed utilities in Tailwind apply to all screen sizes, and prefixed utilities like md: or lg: apply from that breakpoint width and above. This means you design the mobile layout first, then layer on styles for larger screens using breakpoint prefixes.
- How do I use a breakpoint prefix in Tailwind?
- Prepend the breakpoint name followed by a colon to any utility class. For example, md:text-lg applies the text-lg class only when the viewport is 768px wide or wider. You can stack multiple prefixes: sm:text-sm md:text-base lg:text-lg to scale a value across widths.
- How do I add a custom Tailwind breakpoint?
- In Tailwind v3, extend the theme in tailwind.config.js under theme.extend.screens, e.g. '3xl': '1920px'. In Tailwind v4, you define custom breakpoints using CSS custom properties or @theme in your CSS file. This checker's 'Custom' mode lets you test any breakpoint values without touching your config.
- What changed with breakpoints in Tailwind CSS v4?
- Tailwind v4 introduces an xs breakpoint at 30rem (480px) and shifts to CSS-variable-based theme configuration instead of a JavaScript config file. The default breakpoints in rem are: xs 30rem, sm 40rem, md 48rem, lg 64rem, xl 80rem, 2xl 96rem.
- What are container queries in Tailwind CSS?
- Container queries let you apply styles based on the size of a parent element rather than the full viewport width. In Tailwind v3+ with the container queries plugin, you use the @container utility and size variants like @sm: and @md:. They are useful for reusable components whose layout should adapt to their container, not the screen.
- Why does my breakpoint prefix seem to have no effect?
- The most common causes are: missing the viewport meta tag in your HTML head, purging the class in production before it was used, or accidentally writing the class as md-text-lg (hyphen) instead of md:text-lg (colon). Also confirm you are testing at the correct minimum width — for example, md: requires at least 768px.
- How is this Tailwind Breakpoint Checker different from browser DevTools?
- Browser DevTools show you the current viewport width, but you still have to mentally map that number to the right Tailwind breakpoint. This tool does that mapping instantly, displays the exact range, tells you which prefix to use, and shows how many pixels remain until the next breakpoint — saving the mental overhead during responsive debugging.