What is header folding?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Header folding is a legacy formatting trick from the early days of email. When a header line got too long (Subject line with lots of characters, or a long list of recipients), the mail system would split it across multiple lines by inserting a line break followed by whitespace. The receiving system would then treat those multiple lines as one continuous header.
But Here's the thing: you don't need to think about header folding anymore. Modern ESPs and email clients handle it automatically. If you're using Mailchimp, SendGrid, Postmark, or any modern platform, they won't create folded headers. They'll send everything as single lines.
Why it still matters: your email client must be able to READ folded headers, even though it shouldn't CREATE them. Some old mail servers still send folded headers, and if your system can't parse them correctly, you might see broken subject lines or recipient lists. This is called "obsolete folding" (obs-fold) in RFC 5322, the spec that defines email format. It's marked obsolete because new systems shouldn't use it, but they still need to understand it for backward compatibility.
The practical impact: if you're building custom email software or working with raw SMTP, be aware that folded headers exist in the wild. When you parse incoming mail, treat a line break followed by whitespace as a continuation of the previous header, not a new one. If you're just sending marketing emails or transactional notifications through an ESP, you don't need to do anything. Your platform handles it.
And if you're debugging delivery issues and see folded headers in your raw email source, that's normal for older systems. It won't cause spam filtering on its own. What WILL cause problems is if your custom code folds headers incorrectly (wrong whitespace, breaking mid-word, or folding headers that shouldn't be folded at all). Mail systems expect folded lines to be treated as continuous text, so incorrect folding can break authentication signatures or cause the receiving server to reject your message entirely.
Want to see what your headers actually look like? Use our Email Header Analyzer to check the raw source. If you're stuck on a delivery issue that might be header-related, ask us and we'll walk through it with you.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.