Nouplo

Tipos MIME

Qué poner en Content-Type y qué pasa cuando está mal.

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.

Tus archivos se quedan en tu dispositivo

Esta herramienta se ejecuta por completo en tu navegador. Lo que pegas se procesa en tu dispositivo y nunca se envía a un servidor, así que puedes usarla con tokens, claves y textos sin publicar.

Cómo funciona

  1. Deja el cuadro vacío para la lista.
  2. Escribe una extensión —png, o .png— para su tipo.
  3. Escribe parte de un tipo, como image/, para todo lo que cuelgue de él.
  4. Lee las notas: unos cuantos fallan calladamente en vez de a gritos.

Preguntas frecuentes

¿Cuáles importan de verdad?
Aquellos sobre los que un navegador se niega a actuar cuando están mal. Un SVG servido como text/plain no se muestra. Un módulo de WebAssembly servido como cualquier cosa que no sea application/wasm no se puede transmitir en flujo. Un archivo de subtítulos .vtt con el tipo equivocado no carga, y no dice nada.
¿Es text/javascript o application/javascript?
text/javascript. application/javascript fue la recomendación durante años y hoy está obsoleto, pero ambos funcionan en todas partes y seguirás viendo el antiguo.
¿Debo añadir charset=utf-8?
A text/html y text/plain, sí. A application/json no: el JSON es UTF-8 por definición y un parámetro charset ahí no significa nada, aunque tampoco haga daño.
¿Qué es application/octet-stream?
«Unos bytes, y no te voy a decir cuáles.» Es la respuesta correcta cuando de verdad no lo sabes, y hace que el navegador descargue en lugar de mostrar.
¿Se envía algo a un servidor?
No. Funciona en tu navegador, así que lo que escribas se queda en tu ordenador.

Herramientas relacionadas