How to fix Overfull \hbox warnings in LaTeX

Updated 2026-06-02

An 'Overfull \hbox' warning means a box of content is wider than the space it has, so it spills past the right margin. The warning reports how many points it overflowed by and which line it came from. Small overflows are cosmetic; large ones are visible in the PDF.

What causes Overfull \hbox

A long unbreakable element: an over-wide figure or table, a long inline equation, a URL or code span with no break points, or a long word LaTeX cannot hyphenate.

The warning's badness and point count tell you how serious it is - a few points is usually invisible; tens of points is a real margin overflow.

How to find and fix it

Read the log line: it names the source line and the overflow amount. Go there first.

For figures and tables, scale to the column (\columnwidth, \resizebox) - the most common real cause. For long URLs, load the url or hyperref package and wrap them in \url{}. For inline math that overflows, switch to a display equation with multline.

Catch the layout cases automatically

Most overfull-box warnings that actually show in the PDF come from figures and tables wider than the column - exactly what a pre-submission check detects and fixes. See /fix-figure-overflow-latex and /fix-table-width-latex.

Frequently asked questions

Should I fix every Overfull \hbox warning?+

No. Overflows of a few points are not visible. Focus on large ones (tens of points or more), which correspond to content actually crossing the margin.

Check your paper before reviewers do

Upload your .tex or .zip and get a corrected file plus a plain-English changelog in under 60 seconds.

Check My Paper - Free