CTG

Content-Type Generator (MIME Header Builder)

Build Content-Type values with optional charset and quoted parameters

API & HTTP
🔒 100% client-side — your data never leaves this page
Maintained by Evan•Updated: September 30, 2026
Options
Content-Type Builder

Choose type/subtype for the actual content. Parameters are optional; multipart needs a boundary matching its body.

Output
Generated header appears here
Processed locally in your browser
Page reading mode

The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.

About this tool

Choose a media type and subtype, then add parameters for the representation you are sending. The generator checks token syntax, quotes Charset and Boundary values when needed, parses semicolon-separated Extra params, and rejects duplicate names. Multipart requires a usable boundary. It displays both the field value and a complete Content-Type: line; the copy button copies the value. It does not generate a body, discover the content format, register a MIME type, or send a request.

Failure Clinic (Common Pitfalls)

Setting a boundary does not build a multipart body

Cause: The tool formats a declaration only; it does not serialize fields, files, or delimiter lines.

Fix: When sending browser FormData with fetch, let the browser set Content-Type and the matching boundary. For a manually serialized body, enter the boundary used by that exact body.

Adding charset does not re-encode content

Cause: A charset parameter describes bytes already produced elsewhere. application/json has no defined charset parameter.

Fix: Use application/json for JSON and leave Charset blank. For text/html, choose the actual encoding rather than changing only the declaration.

Scenario Recipes

01

Declare UTF-8 HTML

Goal: Build a header for HTML that is already encoded as UTF-8.

  1. Select text and enter html as the subtype.
  2. Enter utf-8 in Charset and leave Boundary and Extra params empty.
  3. Generate text/html; charset=utf-8 and use the value in the receiving application’s Content-Type field.

Result: The page also displays Content-Type: text/html; charset=utf-8 for contexts that require a complete header line.

Suggested Workflow

Frequently Asked Questions

How do I enter custom parameters?

Use name=value pairs separated by semicolons. Quote an extra parameter value containing a space or semicolon, such as note="a;b". Do not repeat Charset or Boundary in Extra params when you already filled its dedicated field.

Does a generated value prove compatibility?

No. Syntax checks cannot establish that an endpoint accepts the type or that the body matches the declared charset or boundary. Check the receiving API and the actual body.

Does the tool keep a draft?

The form is saved in local storage in this browser and restored on return. Clear removes the saved draft. Header generation itself does not upload the form.

Keep browsing