DevTools Logo

Raw HTTP Request Parser

Raw HTTP Request Parser

Parse raw HTTP wire text into a request line, headers and body — then replay where the browser allows or export curl.

Runs in your browser

Raw HTTP request

Try an example

Everything stays in this tab — nothing is uploaded or saved. Never paste production credentials you do not own.

Parsed result

waiting for request

Paste a raw HTTP request to start parsing

Try a simple GET, a chunked POST, a CONNECT tunnel or an HTTP/2 pseudo-header text form.

Details

Raw HTTP from logs, tcpdump and proxy captures is where upload bugs, header quirks and authentication failures hide. This parser takes that wire-format text — not curl syntax and not a single header — and turns it into a structured view: request line with method, target form and version, headers with RFC 7230 obs-fold unfolding and duplicate handling, and a body framed by Content-Length or chunked transfer coding. Byte offsets, chunk sizes and extensions, trailers, query parameters, multipart parts and locally decoded Authorization headers are all shown side by side with the raw text. Framing is byte-accurate over the UTF-8 encoding of your paste, so hex views and offsets describe the bytes the parser actually sees. Bodies can be previewed as text (with charset detection and a latin1 fallback note) or hex, pretty-printed as JSON when detectable, and downloaded. Replay is a separate, explicit action: the browser computes Host, strips hop-by-hop and forbidden headers, keeps redirects manual, and reports CORS or mixed-content failures honestly instead of pretending to have a proxy. A curl command is always available as the reliable export path. Nothing is uploaded or stored.

More examples

Simple GET with query

GET /api/users?page=2&active=true HTTP/1.1
Host: api.example.com
Accept: application/json

Origin-form request: method, path, decoded query parameters and the Host header are parsed into separate fields.

Chunked JSON POST

POST /upload HTTP/1.1
Host: example.com
Transfer-Encoding: chunked

1d;meta=first
{"name":"Ada","role":"admin"}
0
X-Trace: abc123

The chunk size is hexadecimal with an extension, the body is assembled from chunk data only, and the trailer is listed separately.

CONNECT tunnel setup

CONNECT example.com:443 HTTP/1.1
Host: example.com:443
Proxy-Connection: keep-alive

Authority-form target is recognized; the UI explains that fetch cannot replay CONNECT and offers curl export instead.

Examples

Chunked upload with a trailer

Input
POST /upload HTTP/1.1
Host: example.com
Transfer-Encoding: chunked

1d;meta=first
{"name":"Ada","role":"admin"}
0
X-Trace: abc123

Output
Method POST · target /upload · version HTTP/1.1
Header: Transfer-Encoding: chunked
Chunk 1: 29 bytes, extension meta=first, decoded JSON body
Chunk 2: 0 bytes, trailer X-Trace: abc123

Only chunk data is assembled into the body; the size lines, extensions and trailer are shown separately with byte offsets.

Conflicting Content-Length values

Input
POST / HTTP/1.1
Content-Length: 3
Content-Length: 4

abc
Output
Error: Conflicting duplicate Content-Length headers. RFC 9110 §8.6 rejects differing duplicate values.

The parser refuses to guess which length a recipient used, rather than silently slicing 3 or 4 bytes.

HTTP/2 pseudo-header text

Input
:method: GET
:scheme: https
:authority: api.example.com
:path: /v1/status?verbose=1
accept: application/json

Output
Method GET · target https://api.example.com/v1/status?verbose=1
Query: verbose = 1
Note: denormalized HTTP/2 text form, not binary frames.

A denormalized h2 header list still parses into a useful view without pretending to decode HPACK or frames.

About this tool

Raw HTTP Request Parser turns wire-format request text from logs, tcpdump output or proxy captures into a structured view. It reads the request line (method, target form, HTTP version), the header block with RFC 7230 obs-fold continuations and duplicate fields, and the body framed by Content-Length or chunked transfer coding. The result is shown beside the raw text so every parsed value can be checked against its source line.

Framing and offsets are byte-based over the UTF-8 encoding of the pasted text. Chunk sizes are parsed as hexadecimal, extensions are separated from the size, trailers are listed after the terminating zero chunk, and a body that ends before its declared length is reported instead of silently accepted. Text bodies can be decoded with the charset declared in Content-Type, with a UTF-8 validity probe and a latin1 fallback note; a hex view always shows the exact bytes.

The tool also surfaces the parts that usually send you back to a packet capture: decoded query parameters, locally decoded Basic/Bearer/Digest Authorization values, multipart part names, filenames and byte sizes, and diagnostics such as conflicting Content-Length headers or an absolute-form target that disagrees with Host. Replay through browser fetch is deliberately best-effort and clearly explained; curl export is always available and has no browser restrictions.

What this tool does not do

  • No upload, proxy or network interception: parsing and decoding happen locally; there is no companion backend.
  • Replay is best-effort browser fetch: CORS, mixed-content blocking, forbidden methods and forbidden headers can prevent it; the tool explains but cannot bypass those rules.
  • The input is a pasted string encoded as UTF-8, not a raw byte stream; arbitrary non-UTF-8 bytes, TLS frames and HTTP/2 binary frames are out of scope.
  • Input and decoded body are capped at 8 MB so the browser tab stays responsive; larger captures must be sliced before pasting.
  • JWT signature verification is not performed; the payload is decoded for inspection only. Basic credentials are base64-decoded, not validated.
  • Multipart parsing recognizes standard form-data part headers but does not decode content transfer encodings or nested multipart bodies.
  • NUL bytes in a body cannot be passed through a shell argument; the curl export stops at the first NUL and warns.

How to use this tool

  1. Paste the request

    Copy the raw request block — including the blank line before the body — into the input pane. Enable log-prefix stripping for syslog or tcpdump output.

  2. Parse it

    Click Parse request or press Cmd/Ctrl+Enter. The structure, headers, body, replay and curl tabs become available.

  3. Inspect framing and details

    Switch to Body for text/hex, chunk offsets and JSON formatting; open Headers for duplicates, trailers and raw-line highlighting.

  4. Replay or export

    Set the replay scheme and cookie choice, see the effective URL, then Replay. If CORS or the browser blocks it, copy the curl command instead.

Use cases

Debug a reproduced request

Paste the request a server logged and see method, target, headers and body without hand-decoding escapes or chunk sizes.

Inspect an upload failure

Check multipart part names, filenames, content types and byte sizes, plus the exact chunk framing the client sent.

Investigate header quirks

Spot obs-fold continuations, duplicated singleton headers, absolute-form/Host mismatches and conflicting Content-Length values.

Replay or hand off a request

Try a browser replay on a CORS-permitted endpoint, or export a shell-quoted curl command for a machine where the endpoint is reachable.

Supported request forms and framing

ElementHow it is parsed
Request lineMETHOD SP target SP HTTP/major.minor with a strict version anchor. Origin-form (/path?query), absolute-form (proxy URL), authority-form (CONNECT host:port) and asterisk-form (OPTIONS *) are distinguished.
Header fieldsname: OWS value OWS with RFC token validation. Continuation lines starting with SP or HTAB are unfolded into the previous value while the raw line stays visible.
DuplicatesEach field is kept separately. List fields such as Accept and Set-Cookie join with commas for display; duplicate singleton fields such as Host get a warning.
Content-LengthExactly one non-negative decimal value; identical duplicates are tolerated with a note, differing values are an error. A short body is reported as truncated.
Transfer-Encoding: chunkedhex-size [;extensions] CRLF data CRLF repeated until a zero chunk, then trailers. Transfer-Encoding wins over Content-Length per RFC 9112 §6.3.
HTTP/2 text formPseudo-headers such as :method and :path are converted into a request-like view with an explicit note. Binary HTTP/2 frames are out of scope.
Response linesHTTP/1.1 404 Not Found is parsed with status-line semantics; the same header and body framers apply.

The parser operates on the UTF-8 bytes of the pasted string. Clipboard text cannot reproduce arbitrary non-UTF-8 wire bytes, so a true binary capture should be inspected as a hex dump or file elsewhere.

Common mistakes

Mistake:Pasting only the body of a logged request and expecting a parse.

Fix:Include the request line and headers, up to and including the blank separator line. A body-only paste has no start line to parse.

Mistake:Assuming the browser can replay every captured request.

Fix:fetch forbids CONNECT/TRACE, silently drops headers such as Cookie and Origin, cannot send an http URL from an https page, and cannot bypass CORS. Read the Replay notes and export curl when those limits apply.

Mistake:Treating the visible text as the exact wire bytes for a binary body.

Fix:Clipboard paste is a JS string encoded as UTF-8. Use the hex view for what the parser actually sees, and remember that NUL bytes cannot be represented in a shell argument.

Mistake:Reading the last value of a duplicated singleton header as what the server received.

Fix:The display applies the last value only for convenience; every duplicate stays in the headers table and a warning marks the field as a singleton.

Frequently asked questions

Why does replay fail with CORS?

The replay button calls fetch from this page's origin, so the target must allow that origin in its Access-Control-Allow-Origin header. A cross-origin server that does not opt in makes the response unreadable, and fetch reports the failure as the same opaque TypeError as a network problem. The browser cannot be told to ignore CORS, and this tool has no proxy. Use the curl export from a machine that can reach the endpoint instead.

How are chunked bodies decoded?

The parser reads each chunk size as hexadecimal (ignoring any semicolon-delimited extensions), takes exactly that many bytes of data, expects CRLF, and repeats until a zero-size chunk. Lines after the zero chunk are parsed as trailers. The body view shows the assembled bytes, while the chunk table keeps each size, extension and byte offset so framing errors can be located precisely.

What happens to duplicate headers?

Every header line is kept separately. Fields that may appear more than once — such as Accept and Set-Cookie — are joined with commas for display only. Singleton fields such as Host or Content-Type get a warning and the last value is shown, because no server would interpret the merged text as one valid field. Conflicting Content-Length values are an outright parse error, as RFC 9110 requires.

Is my request uploaded or saved?

No. Parsing, decoding and curl export happen entirely in the browser tab. The input is deliberately not persisted to localStorage, and no request contents are logged. The only outbound network call is the replay you trigger yourself; it goes directly from your browser to the target URL and is subject to its CORS policy.

Does it handle HTTP/2 binary frames?

No. Binary HTTP/2 frames and HPACK-compressed headers need a frame decoder. What this tool does support is the denormalized text form you sometimes see in logs — lines such as :method: GET and :authority: example.com — which it converts into a request-like view with an explicit note about the limitation.

References & standards