Errors / JavaScript errors
Error: Hydration failed because the server rendered HTML didn't match the client
The page the server sent and the page the browser built did not match, so the browser rebuilt it.
The page flashes or re-renders, loses the speed of server rendering, and sometimes shows the wrong content.
Why it happens
- Rendering something that differs between server and browser: a date or time,
Math.random(),windoworlocalStorageread during render. - Invalid HTML nesting (a
<div>inside a<p>), which the browser corrects before React compares. - A browser extension or a third-party script changing the DOM before React hydrates.
- In production builds the message is short:
Minified React error #418or#423.
How to fix it
- Move browser-only values into an effect, or render them only after mount.
- Fix the HTML nesting the error or the dev build points at.
- For one element that must differ (a timestamp),
suppressHydrationWarningon that element.
Whose problem it is
Usually the site's own code or settings.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.