Consulta de tipos MIME
Encuentra el tipo MIME, o Content-Type, de cualquier extension de archivo comun.
Que es un tipo MIME?
MIME, o Multipurpose Internet Mail Extensions, identifica la naturaleza y el formato de un archivo o flujo de bytes. Los servidores web usan tipos MIME para indicar al navegador que contenido se esta sirviendo y como debe tratarlo.
Estructura del tipo MIME
Los tipos MIME se componen de un tipo y un subtipo separados por una barra.
type/subtype
Ejemplos:
text/html- documentos HTMLimage/jpeg- imagenes JPEGapplication/json- datos JSONvideo/mp4- videos MP4
Categorias comunes de tipos MIME
Imagenes
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.jpg |
image/jpeg |
JPEG Image |
.png |
image/png |
PNG Image |
.gif |
image/gif |
GIF Image |
.webp |
image/webp |
WebP Image |
.svg |
image/svg+xml |
SVG Vector |
.ico |
image/x-icon |
Icon |
.bmp |
image/bmp |
Bitmap Image |
.avif |
image/avif |
AVIF Image |
Documentos
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.pdf |
application/pdf |
PDF Document |
.doc |
application/msword |
Word Document |
.docx |
application/vnd.openxmlformats-officedocument.wordprocessingml.document |
Word Document |
.xls |
application/vnd.ms-excel |
Excel Spreadsheet |
.xlsx |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
Excel Spreadsheet |
.ppt |
application/vnd.ms-powerpoint |
PowerPoint |
.pptx |
application/vnd.openxmlformats-officedocument.presentationml.presentation |
PowerPoint |
.txt |
text/plain |
Plain Text |
.csv |
text/csv |
CSV File |
Codigo
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.html |
text/html |
HTML Document |
.css |
text/css |
CSS Stylesheet |
.js |
application/javascript |
JavaScript |
.json |
application/json |
JSON Data |
.xml |
application/xml |
XML Document |
.php |
application/x-php |
PHP Script |
.py |
text/x-python |
Python Script |
.ts |
application/typescript |
TypeScript |
.md |
text/markdown |
Markdown |
Audio
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.mp3 |
audio/mpeg |
MP3 Audio |
.wav |
audio/wav |
WAV Audio |
.ogg |
audio/ogg |
OGG Audio |
.flac |
audio/flac |
FLAC Audio |
.m4a |
audio/mp4 |
M4A Audio |
.aac |
audio/aac |
AAC Audio |
Video
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.mp4 |
video/mp4 |
MP4 Video |
.webm |
video/webm |
WebM Video |
.avi |
video/x-msvideo |
AVI Video |
.mov |
video/quicktime |
QuickTime Video |
.mkv |
video/x-matroska |
Matroska Video |
.mpeg |
video/mpeg |
MPEG Video |
Archivos comprimidos
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.zip |
application/zip |
ZIP Archive |
.rar |
application/vnd.rar |
RAR Archive |
.7z |
application/x-7z-compressed |
7-Zip Archive |
.tar |
application/x-tar |
TAR Archive |
.gz |
application/gzip |
Gzip Archive |
Fuentes
| Extension | Tipo MIME | Descripcion |
|---|---|---|
.woff |
font/woff |
Web Font |
.woff2 |
font/woff2 |
Web Font 2 |
.ttf |
font/ttf |
TrueType Font |
.otf |
font/otf |
OpenType Font |
Por que importan los tipos MIME
Aplicaciones practicas
- Desarrollo web: Los servidores usan tipos MIME para indicar al navegador como manejar cada archivo.
- Descargas de archivos: Los tipos correctos ayudan a descargar archivos en lugar de renderizarlos mal en el navegador.
- Desarrollo de APIs: Las APIs usan tipos MIME para describir formatos de peticion y respuesta.
- Adjuntos de correo: Los clientes de correo dependen de los tipos MIME para tratar adjuntos correctamente.
- Seguridad: Los navegadores aplican ciertas reglas de seguridad segun el manejo del tipo MIME.
Referencia rapida
Mas comunes:
- HTML:
text/html - CSS:
text/css - JavaScript:
application/javascript - JSON:
application/json - JPEG:
image/jpeg - PNG:
image/png - PDF:
application/pdf
Errores comunes
- Usar text/plain para payloads JSON.
- Servir JavaScript con un tipo MIME incorrecto.
- Olvidar tipos MIME de fuentes en la entrega estatica.
- Usar application/x-www-form-urlencoded cuando se espera otro content type.