Developer Tools
Multipart Form Data Builder
Build and parse multipart/form-data request bodies in your browser. Generate the boundary, raw body, and curl, fetch, and Node snippets. No upload.
Detected default: image/png
Content-Type header
multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Raw body
442 bytes, CRLF separated
------WebKitFormBoundary7MA4YWxkTrZu0gW↵↵ Content-Disposition: form-data; name="username"↵↵ ↵↵ alice↵↵ ------WebKitFormBoundary7MA4YWxkTrZu0gW↵↵ Content-Disposition: form-data; name="role"↵↵ ↵↵ admin↵↵ ------WebKitFormBoundary7MA4YWxkTrZu0gW↵↵ Content-Disposition: form-data; name="avatar"; filename="avatar.png"↵↵ Content-Type: image/png↵↵ ↵↵ (binary PNG bytes go here; drop a real file to load actual bytes)↵↵ ------WebKitFormBoundary7MA4YWxkTrZu0gW--↵↵
curl --form
curl -X POST https://api.example.com/upload \ --form 'username=alice' \ --form 'role=admin' \ --form 'avatar=@avatar.png;type=image/png' # Or send the body verbatim with a known boundary: # curl -X POST https://api.example.com/upload \ # -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ # --data-binary @body.bin
fetch + FormData
const form = new FormData();
form.append("username", "alice");
form.append("role", "admin");
// Build a Blob in production from a real File or fetched bytes.
const avatarBlob = new Blob([/* file bytes */], { type: "image/png" });
form.append("avatar", avatarBlob, "avatar.png");
const res = await fetch('https://api.example.com/upload', {
method: 'POST',
body: form,
});
// fetch sets the multipart Content-Type with a fresh boundary for you.Node https.request
import { request } from 'node:https';
import { readFileSync } from 'node:fs';
const body = readFileSync('./body.bin');
const req = request({
hostname: 'api.example.com',
path: '/upload',
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW',
'Content-Length': body.byteLength,
},
}, (res) => {
res.pipe(process.stdout);
});
req.write(body);
req.end();About multipart/form-data
multipart/form-data is the media type browsers and HTTP clients use to send forms that include file uploads. The body is a sequence of parts separated by a boundary string declared in the Content-Type header: each part has its own Content-Disposition: form-data with a name parameter, an optional filename parameter, an optional Content-Type, a blank CRLF line, and then the raw bytes of the field. The boundary appears verbatim on its own line as "--boundary" before each part and as "--boundary--" to close the body. Every line break in the framing must be CRLF (\\r\\n). This tool runs locally in your browser, so the fields you type, the files you drop, and the bodies you paste never leave the tab.
How to use
- Pick a tab: Build body to compose a new multipart/form-data request, or Parse body to decode an existing one.
- On Build body, set the boundary or tap Regenerate, then add text fields and file fields. Attach a real file to embed its actual bytes, or paste literal text to use as the body for testing.
- Read the Content-Type header value, the raw body preview with byte length, and copy the curl --form, fetch + FormData, or Node https.request snippet that matches the body you built.
- On Parse body, paste the boundary value if you know it (or leave blank to auto-detect from the first line), then paste the captured multipart body and read the per-part headers, decoded text or hex dump, and any warnings the parser surfaces.
- Use the sample bodies in the parser to see how text fields, file uploads, UTF-8 filenames, and JSON-typed parts look on the wire so you can spot which piece your request is missing.
About this tool
Multipart Form Data Builder is a browser-only workbench for the multipart/form-data media type defined by RFC 7578 (HTML form encoding) on top of the generic multipart framing in RFC 2046. The Build tab lets you compose a request body one field at a time: add text fields with optional Content-Type overrides, add file fields with literal text or by attaching a real file from your device, choose a boundary (auto-generated as a 32 hex char WebKit-style string or edited by hand), and the tool emits the wire bytes with proper CRLF framing, a matching Content-Type: multipart/form-data; boundary=... header, and ready-to-paste curl --form, fetch with FormData, and Node https.request snippets. Filenames with non-ASCII characters get a dual filename="..." plus filename*=UTF-8''... extension per RFC 5987 so receiving servers like Express, Multer, Rack, ASP.NET, and Java EE pick up the Unicode form. The Parse tab goes the other direction: paste a captured multipart body (from DevTools, a proxy log, or a Postman raw view), supply or auto-detect the boundary, and the tool returns the per-part Content-Disposition name and filename, Content-Type, Content-Transfer-Encoding, raw header block, byte length, and either a decoded text body or a hex dump preview for binary parts. Malformed input is explained with targeted errors: missing closing delimiter, missing blank-line separator between headers and body, LF-only line breaks that should be CRLF, boundary mismatch, oversized input, preamble bytes before the first boundary, and stray bytes after the closing boundary. Useful for backend developers writing file-upload endpoints, QA engineers building API integration tests, security researchers reading captured request bodies, and anyone debugging why a multipart upload is rejected by the server. Everything runs locally; the fields you type, the files you attach, and the bodies you paste never leave the browser.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Content-Disposition Header Builder
Build RFC 6266 download headers with UTF-8 filenames; parse and explain existing values.
Open tool
DevelopercURL Command Builder
Form-driven builder that emits curl, PowerShell, HTTPie, wget, fetch, and raw HTTP/1.1.
Open tool
DevelopercURL Command Parser
Decode curl: method, URL, headers, body, basic auth, cookies, and flag-by-flag explanations.
Open tool
DeveloperHTTP Headers Parser
Parse, classify, and decode HTTP headers, with a missing security headers audit.
Open tool
DeveloperURL Encoder Decoder
Encode and decode percent-encoded URLs.
Open tool
DeveloperBase64 Encoder Decoder
Encode and decode Base64 with full Unicode.
Open tool