multipart/form-data Parser
Paste a multipart/form-data body with its boundary and inspect each part (Content-Disposition, filename, Content-Type, size).
Reading a multipart/form-data body
A form with a file uses multipart/form-data, and the resulting body is a sequence of parts separated by a marker declared in the Content-Type. Each part has headers of its own followed by its content. Paste the body and the page separates the parts, showing each one's field name, filename and declared type.
The marker has rules: it appears in the body preceded by two hyphens, and the end of the message is the marker with two hyphens at the end as well. So it must be a sequence that does not occur inside any part — if it does, the body is cut in the wrong place. That is why browsers generate long, random markers rather than something readable.
The information that drives processing comes from each part's Content-Disposition: the name parameter is the form field name, and the presence of filename is what distinguishes a file from a text field. Treat the received filename with suspicion — it comes from the client, may contain a path, and is the classic vector for writing a file outside the intended folder.
Frequently asked questions
Why not send a form with a file as JSON?
How does it differ from application/x-www-form-urlencoded?
How do accents appear in a filename?
Related Tools
Data URI Parser
Break a data: URI into mediatype, parameters, base64 flag and payload. Shows decoded byte size of the content.
Content-Type Parser
Decompose a Content-Type header into mediatype, charset, boundary and other parameters. Useful when debugging APIs and uploads.
UUID Parser
Decompose a UUID into version (1, 3, 4, 5, 6, 7, 8), variant, and when applicable, timestamp and node. Supports UUIDs with or without dashes.
Cache-Control Parser
Read a Cache-Control header and show each directive (max-age, no-cache, public, immutable, stale-while-revalidate) with explanation.
URL Analyzer
Decompose any URL into its components: protocol, host, pathname, query parameters and hash. Inspect query strings individually.
NPM Package Specifier Parser
Parse an NPM package spec (lodash, @scope/[email protected], github:user/repo) into name, scope, version and type.