 <p>HTTP is a pretty simple protocol, the following should get the status code out pretty reliably (updated to be a tad more robust):</p> <pre><code>int statusCodeStart = httpString.IndexOf(' ') + 1; int statusCodeEnd = httpString.IndexOf(' ', statusCodeStart); return httpString.Substring(statusCodeStart, statusCodeEnd - statusCodeStart); </code></pre> <p>If you really wanted to you could add a sanity check to make sure that the string starts with "HTTP", but then if you wanted robustness you could also just implement a HTTP parser.</p> <p>To be honest this would probably do! :-)</p> <pre><code>httpString.Substring(9, 3); </code></pre>