Fix · Pages, phones and Arabic
Hydration error: text content does not match
What you may see
- The console says hydration failed or text content did not match
- A date, number or random value flickers on load
Most likely cause
The page the server drew is different from what the browser draws first, usually because of dates, random values, browser-only data, or invalid nesting such as a div inside a p.
Check first (about two minutes)
- Read the message: does it name an element nesting problem (for example div in p)?
- Do you show the current time, a random id, or localStorage content directly while rendering?
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find the component named in the message.
- Find values that differ between server and browser (Date, Math.random, window, localStorage, language or time zone) and move them into an effect that runs after loading, or render them the same on both sides.
- Fix invalid HTML nesting (a div in a p, a link in a link, a button in a button).
- If a browser extension modifies the page, test in a private window first.
Do not do this
- Do not turn server rendering off for the whole site.
- Do not hide the warning with suppressHydrationWarning everywhere.