Logs do not read themselves, and worse, they do not always fit. Modern applications happily emit single lines that stretch to hundreds of kilobytes: a stack trace that forgot a newline, a serialized request or response body dumped in full, or one massive JSON record that never breaks. Those lines overflow database columns, wrap and split in terminals, break log shipper line limits and make every viewer that follows them choke, wrap, or silently truncate anyway — but now in a way you do not control and cannot reason about.
Log Truncator puts you in control of that cut. Paste any log, set the maximum line length you need to satisfy (120 columns for a terminal, 4096 bytes for a shipper, whatever your downstream system demands), and every line longer than the limit is trimmed to fit with an explicit marker — an ellipsis by default — so it is always obvious something was removed. When you also enable Keep words whole, the cut slides back to the nearest space, protecting identifiers, paths, and tokens from being sliced in half. The tool reports how many lines were changed and which line was the longest, so you can see both the scope of the problem and whether the result actually fits.
There is always a tension between fidelity and fit. The original text remains in the input above until you clear it, so truncation here is a deliberate, reversible view. This is for producing compact, well-behaved logs that land cleanly in the next system down the pipeline rather than a lossless transform.
The four summary cards give a quick read on the whole file: total lines, how many were actually truncated, the length of the single longest original line, and the resulting output size measured in real UTF-8 bytes rather than raw character count — so a log with accented names, emoji, or non-Latin scripts reports an accurate size against a byte-based downstream limit instead of silently under-counting multi-byte characters. That distinction matters: 100 East Asian characters is 100 characters long but roughly 300 bytes in UTF-8, and a shipper enforcing a byte ceiling will reject it long before a character count alone would flag it as too long.