Free webp to jpg
VTF

Valve Texture Format

image/vnd.valve.source.texture Released 2004 · by Valve Corporation

The image/vnd.valve.source.texture MIME type represents the Valve Texture Format (VTF), a proprietary image format developed by Valve Corporation in 2004 for the Source Engine (powering games like Half-Life 2, Portal, Team Fortress 2, and Counter-Strike: Global Offensive). Similar in concept to Microsoft's DirectDraw Surface (DDS) format, VTF is highly optimized for real-time 3D rendering. It stores image data in GPU-ready block-compressed formats (like DXT1-DXT5) and natively encapsulates mipmaps, animated texture frames, environment cubemaps, and volume textures within a single file.

3D Graphics & Gaming Transparency Animation ✦ HDR Production Ready

Technical Specifications

MIME Type
image/vnd.valve.source.texture
Extensions
.vtf
Container
Valve Texture Format Header
Compression
DXTC (DXT1, DXT3, DXT5) & Uncompressed (BGRA8888, RGB888, etc.)
Algorithms
DXT1-DXT5None
Color Depth
8-bit, 24-bit (RGB), 32-bit (RGBA), 16-bit Floating Point (HDR)
Metadata
None
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/vtfapplication/x-vtf

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
56 54 46 00
ASCII: VTF\x00
HTTP Headers
Content-Type: image/vnd.valve.source.texture
HTML Accept Attribute
accept="image/vnd.valve.source.texture, .vtf"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Extremely fast loading within the Source Engine because the block-compressed data goes directly into the GPU's VRAM without CPU decompression overhead
  • Bundles mipmaps, volumetric slices, cubemap faces, and animation frames entirely within a single file
  • Openly documented by the Valve Developer Community, leading to a massive ecosystem of third-party modding tools
Limitations
  • Strictly tied to the Source Engine ecosystem; entirely useless in standard web or print contexts
  • No native support in standard image editors without hunting down and installing specialized plugins
  • Block compression algorithms (DXT) are lossy and can cause visible artifacting, especially on normal maps or smooth gradients

Developer Code Snippets

import magic
# Libmagic usually accurately detects the 'VTF\0' header
print(magic.from_file('texture.vtf', mime=True)) # May output 'image/vnd.valve.source.texture' or generic 'application/octet-stream'
const fs = require('fs');
// Manually detecting the 'VTF\0' magic bytes
const buffer = Buffer.alloc(4);
const fd = fs.openSync('texture.vtf', 'r');
fs.readSync(fd, buffer, 0, 4, 0);
fs.closeSync(fd);
const isVTF = buffer[0] === 0x56 && buffer[1] === 0x54 && buffer[2] === 0x46 && buffer[3] === 0x00;
console.log('Is VTF Texture:', isVTF);
import (
    "bytes"
    "net/http"
)
// http.DetectContentType will not recognize VTF natively. Check the byte prefix directly.
// isVTF := bytes.HasPrefix(buf, []byte{0x56, 0x54, 0x46, 0x00})
$mime = mime_content_type('texture.vtf');
echo $mime; // Standard setups will often resolve this to 'application/octet-stream' without custom magic file definitions.

File Detection Steps

How to programmatically detect a image/vnd.valve.source.texture file by reading its raw bytes:

  1. 1 Check the first 4 bytes for the VTF magic string 'VTF\0' (Hex: 56 54 46 00).
  2. 2 The following 8 bytes dictate the format version (e.g., major version 7, minor version 1 to 5).
  3. 3 The header structure is heavily documented by the community and defines the width, height, frames, and exact DXTC pixel format used.

Software Support

V
VTFEdit
GIMP (via VTF Plugin) GIMP (via VTF Plugin)
P
Paint.NET (via VTF Plugin)
S
Source SDK / Hammer Editor

Conversion Tools

Share & Embed

Markdown Badge
VTF Format Badge
[![VTF Format](https://freewebptojpg.com/mime/image/vtf/badge.svg)](https://freewebptojpg.com/mime/image/vtf)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/vtf/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="VTF Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/vtf.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is a VTF file?

A VTF (Valve Texture Format) file is a compiled texture used by the Source Engine. It contains the raw or compressed pixel data (such as albedo, normal, or specular maps) along with mipmaps and frames used by 3D models and levels in Valve games.

What is the difference between a VTF and a VMT file?

A VTF file contains the actual image data (the pixels), while a VMT (Valve Material Type) file is a plain text file that tells the Source Engine how to render the VTF. The VMT acts as a shader script, defining surface properties, reflections, and assigning the VTF texture to specific material channels.

How do I edit or open a VTF file?

Standard image editors cannot open VTF files natively. Modders typically use community-developed tools like VTFEdit to view and convert them, or install dedicated VTF plugins for image editors like GIMP or Paint.NET to edit them directly.

Related Formats

Share this format