Nouplo

Tipos MIME

O que pôr no Content-Type e o que acontece quando está errado.

tipos
50
Resultado
html htm  text/html
            A web page. Always with charset=utf-8.
css       text/css
js mjs    text/javascript
            application/javascript is obsolete but still served everywhere.
json      application/json
            No charset parameter: JSON is UTF-8 by definition.
xml       application/xml
            text/xml is also registered and means the same to browsers.
txt       text/plain
csv       text/csv
md        text/markdown
yaml yml  application/yaml
            Registered in 2024; text/yaml is what older servers send.
pdf       application/pdf
zip       application/zip
gz        application/gzip
tar       application/x-tar
7z        application/x-7z-compressed
rar       application/vnd.rar
png       image/png
jpg jpeg  image/jpeg
            Note the type is jpeg even when the extension is jpg.
gif       image/gif
webp      image/webp
avif      image/avif
svg       image/svg+xml
            Served as anything else, a browser will not render it.
ico       image/x-icon
            image/vnd.microsoft.icon is the registered one; both work.
bmp       image/bmp
tif tiff  image/tiff
heic      image/heic
mp4 m4v   video/mp4
webm      video/webm
mov       video/quicktime
mp3       audio/mpeg
            Not audio/mp3, which is not registered.
m4a       audio/mp4
wav       audio/wav
            audio/x-wav and audio/wave appear in the wild too.
ogg oga   audio/ogg
flac      audio/flac
woff2     font/woff2
woff      font/woff
ttf       font/ttf
otf       font/otf
wasm      application/wasm
            Must be exact or streaming compilation refuses it.
doc       application/msword
docx      application/vnd.openxmlformats-officedocument.wordprocessingml.document
xls       application/vnd.ms-excel
xlsx      application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
ppt       application/vnd.ms-powerpoint
pptx      application/vnd.openxmlformats-officedocument.presentationml.presentation
epub      application/epub+zip
ics       text/calendar
vcf       text/vcard
srt       application/x-subrip
vtt       text/vtt
            Must be exact or the browser ignores the track.
bin       application/octet-stream
            The fallback: bytes with nothing said about them.

Seus arquivos ficam no seu dispositivo

Esta ferramenta roda inteiramente no seu navegador. O que você cola é processado no seu dispositivo e nunca é enviado a um servidor, então é seguro usar com tokens, chaves e textos não publicados.

Como funciona

  1. Deixe a caixa vazia para a lista.
  2. Digite uma extensão — png, ou .png — para ver o tipo.
  3. Digite parte de um tipo, como image/, para tudo que cai embaixo dele.
  4. Leia as notas: alguns falham caladinhos em vez de aos berros.

Perguntas frequentes

Quais realmente importam?
Aqueles em que o navegador se recusa a agir quando estão errados. Um SVG servido como text/plain não renderiza. Um módulo WebAssembly servido como qualquer coisa que não seja application/wasm não pode ser transmitido em fluxo. Um arquivo de legenda .vtt com o tipo errado não carrega e não avisa.
É text/javascript ou application/javascript?
text/javascript. application/javascript foi a recomendação por anos e hoje está obsoleto, mas os dois funcionam em toda parte e você vai continuar vendo o antigo.
Devo acrescentar charset=utf-8?
Em text/html e text/plain, sim. Em application/json, não: JSON é UTF-8 por definição e um parâmetro charset ali não significa nada, embora seja inofensivo.
O que é application/octet-stream?
“Uns bytes, e eu não vou dizer quais.” É a resposta certa quando você genuinamente não sabe, e faz o navegador baixar em vez de exibir.
Alguma coisa é enviada para um servidor?
Não. Roda no navegador, então o que você digitar fica no seu computador.

Ferramentas relacionadas