LaTeX Warning: Overfull \hbox (text in margin)
An "Overfull \hbox" warning means a line is wider than the text area — text spills into the margin. It is usually caused by a long unbreakable word or URL. Fix it by allowing the word to break (\usepackage{url} or \usepackage{hyphenat}), inserting a manual break point, or rephrasing the line.
Why it happens
LaTeX cannot hyphenate certain long tokens (URLs, code, long compound words), so the line runs past the margin. The log shows "Overfull \hbox (12.3pt too wide)".
Example
% Long URLs overflow — use the url package:
\usepackage{url}
% ...
\url{https://example.com/some/very/long/path}
% Allow breaking a long word:
\usepackage[none]{hyphenat} % or insert \- break hints:
super\-cali\-fragi\-listicFrequently asked questions
Can I just ignore Overfull \hbox?
Small overflows (a point or two) are often harmless, but visible text in the margin should be fixed. Set \hfuzz=2pt to silence tiny ones.
How do I see which line?
The log/console shows the line number and how many points it overran, e.g. "Overfull \hbox (15.0pt too wide) in paragraph at lines 80--82".
Try the fix in LetX
Open the editor, paste your code, and compile in 1–2 seconds to see the error clear — free, in your browser.
Open LetX Free