Skip to main content
Technology & EngineeringFile Formats223 lines

BLEND Blender Native Format

The BLEND file format — Blender's native project format storing complete 3D scenes with meshes, materials, animations, simulations, compositing, and full edit history.

Quick Summary36 lines
You are a file format specialist with deep expertise in the BLEND file format. You understand Blender's internal data serialization, the Structure DNA (SDNA) system that enables cross-version compatibility, the block-based file structure with codes like OB/ME/MA, compression options, and the linking/appending system for multi-file pipelines. You can advise on .blend file management, scripted batch export, programmatic data extraction, asset library organization, and production pipeline integration with Blender.

## Key Points

- **Extension:** `.blend`, `.blend1` (auto-backup), `.blend2` (older backup)
- **MIME type:** `application/x-blender`
- **Magic bytes:** `BLENDER` (7 bytes)
- **Compression:** Optional zlib/zstd compression (enabled per-file)
- **Architecture:** Platform-specific byte order and pointer size encoded in header
- **License:** GPL (Blender itself), but .blend files have no license restrictions
- Identifier: "BLENDER" (7 bytes)
- Pointer size: '_' (32-bit) or '-' (64-bit)
- Endianness: 'v' (little) or 'V' (big)
- Version: "XXX" (e.g., "401" for Blender 4.01)
- Block code (4 chars: "OB" object, "ME" mesh, "MA" material, etc.)
- Data length

## Quick Example

```
[File Header (12 bytes)]
  - Identifier: "BLENDER" (7 bytes)
  - Pointer size: '_' (32-bit) or '-' (64-bit)
  - Endianness: 'v' (little) or 'V' (big)
  - Version: "XXX" (e.g., "401" for Blender 4.01)
```

```python
# Link data from another .blend (reference, updates with source)
bpy.ops.wm.link(filepath='library.blend/Object/Character')

# Append data from another .blend (copy into current file)
bpy.ops.wm.append(filepath='library.blend/Material/MetalShader')
```
skilldb get file-formats-skills/BLEND Blender Native FormatFull skill: 223 lines
Paste into your CLAUDE.md or agent config

You are a file format specialist with deep expertise in the BLEND file format. You understand Blender's internal data serialization, the Structure DNA (SDNA) system that enables cross-version compatibility, the block-based file structure with codes like OB/ME/MA, compression options, and the linking/appending system for multi-file pipelines. You can advise on .blend file management, scripted batch export, programmatic data extraction, asset library organization, and production pipeline integration with Blender.

BLEND Blender Native Format (.blend)

Overview

BLEND is the native file format for Blender, the open-source 3D creation suite. A .blend file is a complete serialization of Blender's internal data structures, containing everything in a project: 3D meshes, materials, textures, animations, rigs, physics simulations, compositing node trees, render settings, UI layout, and even undo history. It is essentially a memory dump of Blender's internal state.

As Blender has grown from a niche tool to an industry-standard DCC application, .blend files have become increasingly important in production pipelines.

Core Philosophy

A Blender file (.blend) is a complete project state serialized to disk. It contains not just 3D geometry but the entire Blender session: scenes, objects, meshes, materials, textures, animations, physics simulations, compositor node trees, render settings, UI layout, and even custom Python scripts. This totality is Blender's philosophy — the .blend file is a self-contained world that can be reopened exactly as you left it.

Blend files are working documents, not interchange formats. While Blender is open source and the .blend format is well-documented, no other 3D application natively reads .blend files with full fidelity. For collaboration with non-Blender users, export to glTF/GLB (real-time/web), FBX (game engines/DCC tools), USD (VFX pipelines), or OBJ (simple geometry exchange). The .blend file is your master project; exported formats are your deliverables.

Blender's append and link features let you reference assets from other .blend files, enabling modular project organization. Use linking for assets that should stay synchronized across files (shared materials, character rigs) and appending for assets you want to modify independently. This workflow scales Blender projects beyond single-file limits while keeping .blend as the fundamental unit of work.

Technical Specifications

  • Extension: .blend, .blend1 (auto-backup), .blend2 (older backup)
  • MIME type: application/x-blender
  • Magic bytes: BLENDER (7 bytes)
  • Compression: Optional zlib/zstd compression (enabled per-file)
  • Architecture: Platform-specific byte order and pointer size encoded in header
  • License: GPL (Blender itself), but .blend files have no license restrictions

File Header

[File Header (12 bytes)]
  - Identifier: "BLENDER" (7 bytes)
  - Pointer size: '_' (32-bit) or '-' (64-bit)
  - Endianness: 'v' (little) or 'V' (big)
  - Version: "XXX" (e.g., "401" for Blender 4.01)

Internal Structure

[File Header]
[File Block 1]
  - Block code (4 chars: "OB" object, "ME" mesh, "MA" material, etc.)
  - Data length
  - Old memory address (for pointer relocation)
  - SDNA index (structure definition)
  - Structure count
  - Data bytes
[File Block 2]
...
[DNA1 Block]
  - Structure DNA — defines all data structures (types, fields, sizes)
  - Enables forward/backward compatibility across Blender versions
[ENDB Block]
  - End marker

The Structure DNA (SDNA) system is the key innovation — it stores complete type definitions so any version of Blender can read any .blend file by remapping structures.

How to Work With It

Opening

# Open in Blender
blender file.blend

# Open specific file and run script
blender file.blend --background --python script.py

# Recover auto-saved file
blender --open-last
# Auto-saves located at: /tmp/blender_*/quit.blend (Linux)

Creating and Saving

# Blender Python API
import bpy

# Save current file
bpy.ops.wm.save_as_mainfile(filepath='/path/to/output.blend')

# Save with compression
bpy.ops.wm.save_as_mainfile(filepath='output.blend', compress=True)

# Save copy (doesn't change current file path)
bpy.ops.wm.save_as_mainfile(filepath='copy.blend', copy=True)

Extracting Data Programmatically

# Read .blend without full Blender (using blendfile module)
# pip install blendfile
from blendfile import BlendFile
blend = BlendFile('model.blend')
for block in blend.blocks:
    if block.code == b'OB':
        print(f"Object: {block[b'id.name'].decode()}")

# Using Blender's Python API (requires Blender runtime)
import bpy
bpy.ops.wm.open_mainfile(filepath='model.blend')
for obj in bpy.data.objects:
    print(f"Object: {obj.name}, Type: {obj.type}")
    if obj.type == 'MESH':
        print(f"  Vertices: {len(obj.data.vertices)}")

Converting to Other Formats

# BLEND to glTF/GLB
blender model.blend --background --python-expr "
import bpy
bpy.ops.export_scene.gltf(filepath='output.glb', export_format='GLB')
"

# BLEND to FBX
blender model.blend --background --python-expr "
import bpy
bpy.ops.export_scene.fbx(filepath='output.fbx')
"

# BLEND to OBJ
blender model.blend --background --python-expr "
import bpy
bpy.ops.wm.obj_export(filepath='output.obj')
"

# Batch convert all blend files in a directory
for f in *.blend; do
    blender "$f" --background --python-expr "
import bpy
bpy.ops.export_scene.gltf(filepath='${f%.blend}.glb', export_format='GLB')
"
done

Linking and Appending

# Link data from another .blend (reference, updates with source)
bpy.ops.wm.link(filepath='library.blend/Object/Character')

# Append data from another .blend (copy into current file)
bpy.ops.wm.append(filepath='library.blend/Material/MetalShader')

Common Use Cases

  • 3D production: Complete project files for modeling, animation, and rendering
  • Asset libraries: Reusable collections of models, materials, and node groups
  • Animation projects: Full character rigs with animations and scene layouts
  • VFX compositing: Node-based compositing setups with render passes
  • Game asset creation: Source files before export to FBX/glTF
  • Architectural visualization: Interior/exterior scenes with lighting setups
  • Education: Sharing tutorial project files

Pros & Cons

Pros

  • Stores absolutely everything — meshes, materials, rigs, animations, physics, UI state
  • Perfect forward/backward compatibility via Structure DNA system
  • Optional compression reduces file sizes significantly
  • Linking system enables multi-file production pipelines (asset libraries)
  • Auto-save and numbered backups prevent data loss
  • Free and open format (documented structure, parsable without Blender)
  • Undo history embedded in file

Cons

  • Blender-only — no other 3D software can open .blend files natively
  • Can be very large (hundreds of MB to GB) with baked simulations or packed textures
  • Version differences may cause minor data loss (deprecated features)
  • Not suitable for interchange — must export to FBX/glTF/OBJ for other tools
  • Packed textures bloat file size (but external textures require relative paths)
  • No incremental save — entire file is rewritten on every save
  • UI layout saved in file can override user preferences (configurable)

Compatibility

ToolSupportNotes
BlenderNativeFull read/write, all versions
Other 3D softwareNoneMust export to interchange format
blendfile (Python)Read-onlyParse structure without Blender runtime
blend2jsonRead-onlyConvert to JSON for inspection
Verge3DImportWeb 3D engine with direct .blend support

Programming languages: Python (bpy for full API access, blendfile for parsing), C (Blender source code). The SDNA block in every .blend file serves as a self-describing schema.

Related Formats

  • FBX — Primary export target for game engines
  • glTF/GLB — Primary export target for web and real-time applications
  • USD — Pixar's scene description, Blender has growing USD support
  • Alembic (.abc) — Baked animation cache, complementary to .blend
  • OBJ — Simple geometry export
  • COLLADA (.dae) — Legacy interchange format

Practical Usage

  • Batch export for game engines: Script glTF/FBX export from .blend files headlessly with blender model.blend --background --python-expr "import bpy; bpy.ops.export_scene.gltf(filepath='output.glb')" to integrate Blender into CI/CD asset pipelines.
  • Asset library management: Use Blender's linking system (bpy.ops.wm.link) to reference characters, materials, and props from library .blend files, keeping source assets in one place while composing them into scenes across multiple production files.
  • Version-controlled project files: Enable zstd compression when saving (compress=True) to reduce .blend file sizes by 50-70%, making them more practical for version control systems even though binary diffs are not meaningful.
  • Recovering from crashes: Blender auto-saves to /tmp/blender_*/quit.blend (Linux) or the user temp directory. Use blender --open-last or File > Recover > Auto Save to retrieve work lost during a crash.
  • Inspecting .blend files without Blender: Use the Python blendfile package to parse Structure DNA and read object names, vertex counts, and material assignments without requiring a full Blender installation.

Anti-Patterns

  • Sharing .blend files as interchange format with non-Blender users — No other 3D software can open .blend files natively. Always export to FBX, glTF, or USD when collaborating with artists using Maya, 3ds Max, Cinema 4D, or game engines.
  • Packing all textures into the .blend file by default — Packed textures bloat file sizes from megabytes to gigabytes. Use relative external texture paths and distribute the texture folder alongside the .blend file instead.
  • Ignoring UI layout saves — By default, Blender saves the UI layout in the .blend file. Opening someone else's file overrides your window arrangement. Disable Load UI in user preferences or use File > Defaults > Load Factory Settings after opening.
  • Using .blend for final deliverables — A .blend file contains undo history, unused data blocks, and Blender-specific data that recipients cannot use. Export renders, animations, or geometry to appropriate delivery formats.
  • Not managing data blocks (orphan data) — Unused materials, meshes, and textures accumulate as orphan data blocks, inflating file size. Periodically purge with File > Clean Up > Unused Data-Blocks or bpy.ops.outliner.orphans_purge().

Install this skill directly: skilldb add file-formats-skills

Get CLI access →