Overfull \hbox (Line Too Wide)
Overfull \hbox (Xpt too wide) in paragraph at lines N--M.
What this error means
A line of text is wider than the text area, causing text to stick out into the margin. This is a warning, not an error — compilation continues — but it usually produces visually poor output with text outside the page margins.
Common causes
- A long word or URL that LaTeX can't hyphenate
- \texttt{} or verbatim text that can't be line-broken
- An oversized image or table
- Tight column widths in a table forcing content overflow
How to fix it
For long URLs, use the url or hyperref package with automatic line-breaking. For text, add \sloppy to allow looser line-breaking, or manually insert \- to hint where hyphenation is allowed. For images, ensure they fit within \textwidth.
Code examples
\documentclass{article}
\begin{document}
See the documentation at https://www.example.com/very/long/url/that/does/not/break/automatically/in/latex.
\end{document}\documentclass{article}
\usepackage{hyperref} % enables automatic URL line-breaking
\begin{document}
See the documentation at \url{https://www.example.com/very/long/url/that/does/not/break/automatically/in/latex}.
\end{document}Related errors
No Line Here to End (Misplaced \\)
! LaTeX Error: There's no line here to end.
Underfull \hbox (Poor Word Spacing)
Underfull \hbox (badness 10000) in paragraph at lines N--M.
Float Used in Non-Outer-Par Mode
! LaTeX Error: Not in outer par mode.
Illegal Unit of Measure
! Illegal unit of measure (pt inserted).
Test the fix live
Paste your LaTeX into the playground and compile instantly.

