CLS Layout Shift Debugger
Open a performance trace, see each layout shift on a timeline with its score and session window, the old and new box of each moved element, and the likely cause.
ブラウザ内で動作します。ファイルは端末の外に出ません。 確認方法を見る
…
使い方
- 1Record
Save a Performance trace with reload, scrolling the page as a visitor would.
- 2Open it
Drop the trace or Lighthouse JSON on the page, or load the sample.
- 3Find the worst window
Read the CLS value and the red bars of the worst window on the timeline.
- 4Inspect shifts
Pick each shift to see the moved boxes and the likely cause.
- 5Plan fixes
Mark shifts fixed, write notes and check the projected CLS.
- 6Check HTML
Paste the page source to find unsized media and empty ad slots, then export the CSV.
このツールについて
Cumulative Layout Shift scores how much visible content jumps around while a page is open. A good score is 0.1 or less. The number is built from individual shifts, grouped into session windows: a window collects shifts that happen less than one second apart, up to five seconds long, and the page CLS is the largest window total. Shifts within half a second of a click or key press are excluded because the user caused them. This debugger reads the LayoutShift events in a Chrome performance trace and rebuilds that calculation so you can see it. Every shift is listed with its time, score, window and the impacted nodes, and a timeline bar chart colours the worst window red. Pick a shift to draw the old position of each moved element as a red dashed box and the new position as a green box on a scaled viewport. The debugger also looks at the network around each shift and names likely causes: a web font that finished loading just before, an image that arrived without reserved space, an ad request, or content pushed down from above.
Fix planning
Each shift has a Mark fixed button and a note field. Marking a shift sets its score to zero and recomputes the windows, so the stats show the CLS you would get after that fix. Notes such as the selector, the change and the owner are kept with undo and exported in the CSV.
Checking the HTML
The Check HTML tab finds the usual sources without any trace: img, video, iframe and embed elements with no width and height or aspect-ratio, empty ad containers without a reserved min-height, @font-face rules without font-display, transitions on top or height, and document.write calls. These are the first places to look when a shift appears on a page you have not traced yet.
Lighthouse reports
A Lighthouse JSON gives the CLS value and the elements in the layout shifts audit with Lighthouse's own cause labels, such as unsized media or web font. It has no timing, so the timeline and the box drawing are only available for traces.
Limits
A trace shows one load and the interactions you performed while recording. Shifts that happen later, for example when a cookie banner or a lazy ad appears after scrolling, only count if you recorded them. Node ids refer to the recorded session, not to your source code, and the cause hints are guesses from timing that you should confirm in DevTools. Field CLS from real users is not available here.
計算例
The sample trace has four shifts. The first, at 1,420 ms with score 0.06, comes 120 ms after inter.woff2 finished, so the cause is a font swap. The second, at 3,200 ms with score 0.11, follows banner.png by 150 ms and moves a 1,200 pixel wide block down by 220 pixels; it is an image without width and height. A third shift of 0.04 lands 500 ms later in the same window, and a fourth of 0.2 after a click is excluded. The windows sum to 0.06 and 0.15, so CLS is 0.15, needs improvement. Marking the banner shift fixed drops the projected CLS to 0.06, which is good.
ポイント
- カテゴリ: 開発・データ
- ブラウザ内で動作し、登録もアップロードも不要です。
- 入力した情報は端末内にとどまります。
- 英語で利用できます。
- 内容の最終確認日:
- 公式情報源: web.dev: Cumulative Layout Shift (session windows) and Debug layout shifts
よくある質問
What is a session window?
A group of shifts that are less than one second apart, capped at five seconds. CLS is the largest window total, so one bad burst matters more than many small shifts spread over a long visit.
Why is a shift marked excluded?
Its event says it came right after user input, such as a click that opens a menu. Expected shifts like that do not count towards CLS.
How do I find the element from a node id?
In the DevTools Performance panel, the Layout shifts track names the element for each shift. The old and new boxes drawn here show where it was and where it went.
Do transforms cause layout shift?
No. Animating transform or opacity does not move layout boxes. Animating top, margin or height does, which is why the HTML check flags those transitions.
Can I use web-vitals data?
This tool reads traces and Lighthouse reports. For field data, compare its findings with the largestShiftTarget values your monitoring collects.
Is the file uploaded?
No. Traces are parsed in this browser tab and are not stored, because they can hold URLs and page text.
