The same message for both causes#
React 19 reports a mismatch with a message that lists likely causes. In a local reproduction, a React 19.1 page rendered an order's timestamp with toLocaleString. The server ran in UTC and the browser in Europe/Berlin. React's recoverable error said:
Hydration failed because the server rendered HTML didn't match the client. As a
result this tree will be regenerated on the client. This can happen if a SSR-ed
Client Component used:
- A server/client branch `if (typeof window !== 'undefined')`.
- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes
with the HTML before React loaded.
A second reproduction kept both sides in UTC and ran a script before hydration that changed the heading's text, as a translation extension would. React printed the identical message. React: hydrateRoot
Three causes and the observations that separate them#
| Cause A: the server and client rendered different output | Cause B: something in the browser changed the DOM before hydration | Cause C: the parser repaired invalid nesting | |
|---|---|---|---|
| HTML response vs client render | Differ: the server's text is not what the client computes | Match | Match |
| DOM before hydration vs HTML response | Match | Differ: the DOM has text, attributes or elements the response lacked | Differ in structure only: the same text, with an element closed early or moved |
| Same profile with extensions off | Still fails | Stops failing | Still fails |
| Where the fix goes | The component's rendering inputs | Usually nowhere in the app, or tolerating the change | The component's markup |
The deciding observation is the HTML response itself. Open the document request in the Network panel, read the Response tab, and find the element React complains about. React's development build also prints a diff of the mismatched element below the message.
- In the timezone reproduction, the response said
Placed 20/11/2026, 09:30:00, and the client rendered10:30:00. The response differs from the client render: Cause A. - In the extension reproduction, the response said
Order 1042, and the DOM before hydration saidBestellung 1042. The response matches what the client renders, and the DOM does not: Cause B.
Invalid nesting fails without any extension#
The HTML parser does not keep every tree the server writes. A <div> inside a <p>, for example, closes the paragraph before the div starts, so the DOM has the div beside the paragraph instead of inside it. The server and client rendered the same markup, and turning off extensions does not stop the error. HTML standard: the p element's end tag is implied React's development build usually also logs a separate error naming the two elements, such as In HTML, <div> cannot be a descendant of <p>. The fix is valid nesting in the component.
Confirm Cause B with extensions off#
Turn off every extension in chrome://extensions and reload in the same profile, which keeps its cookies and storage. If the error disappears, re-enable extensions one at a time. An incognito window or a guest profile is not a substitute here: it also drops stored values, such as a saved theme or language, that the component may read during its first client render, and losing one of those can make a Cause A mismatch disappear too. Translation tools, password managers, grammar checkers and dark-mode extensions are the usual ones because they edit text or add attributes. The incognito guide covers the procedure.
Fix Cause A at its input#
A server and client render the same component, so when their output differs, they had different inputs. The common inputs are the clock, the time zone, the locale, random values, and a check for window or a browser API. Make the input explicit: send the server's formatted value or its time zone with the HTML, or render the browser-only part after hydration. React documents a two-pass render for content that must differ on the client. React: different client and server content
suppressHydrationWarning silences the warning for one element's text. It does not make the content match, so use it only where a difference is expected, such as a timestamp that will be replaced immediately.
Worked example: a mismatch reported by one office#
This example is fictional and follows the timezone reproduction. A team in Berlin reports hydration errors on the order page. A colleague in London sees none.
The order page's HTML response showed Placed 20/11/2026, 09:30:00. The Berlin browser rendered 10:30:00. In London, during winter time, the browser's offset matched the server's UTC, so both rendered 09:30:00. With extensions off in the same Berlin profile, the error remained, which ruled out extensions.
The report said: the order timestamp is formatted with the runtime's local time zone. The server runs in UTC, so any browser outside UTC renders a different string and fails hydration. London matches UTC in winter. The receiver could reproduce it by choosing a location with the time zone Europe/Berlin in DevTools' Sensors panel (custom locations), and fix it by formatting the time with an explicit zone, or on the client only.
What to put in the report#
- The full error text and the element React's diff names.
- The element's text in the HTML response and in the DOM, with the HTML from the Response tab, not from the Elements panel.
- The browser's time zone and locale:
Intl.DateTimeFormat().resolvedOptions()in the Console returns both. - Whether the error remains with extensions off in the same profile.
- Any nesting error React logged beside the hydration error.
Questions#
Why not compare with the Elements panel?
The Elements panel shows the live DOM after scripts and extensions ran. To see what the server sent, read the document's Response tab or use view-source.
Does a hydration mismatch break the page?
React can recover by rendering the affected tree again on the client, as the message says. The page may flash, lose the server-rendered content's benefits, or reset state in that tree. Report what the user saw, not only the console message.
Do other frameworks report the same thing?
Frameworks that render on the server and hydrate in the browser have the same causes, with their own message text. The comparison between the HTML response and the client render applies to all of them.
Return to the method for browser bug reports for the other symptoms in this collection.