ZERO-UPLOAD SANDBOX
.sqlite .db .sqlite3 Tier 1 · Deep AST Parser

SQLite 3 Database File

Ubiquitous single-file ACID relational B-tree database with a big-endian 100-byte header at offset 0x00 and full SQL DDL catalog stored in Root Page 1 (`sqlite_schema`).

Header fields are big-endian! `page_size` at 0x10 equals 65536 when stored as 0x0001. Root B-tree leaf table cells on Page 1 contain raw `CREATE TABLE` / `CREATE INDEX` statements.

MIME Types application/vnd.sqlite3, application/x-sqlite3
Byte Endianness big
Container Family sqlite
PRONOM PUID fmt/729
0xFF

Drop any .sqlite file (even 100 GB+) to inspect locally

Reads tiny File.slice() header/footer pages in a sandboxed Web Worker · 0 Bytes Uploaded

Binary Signature & Wire Layout

.sqlite Magic Bytes & Header Offset Map

Offset: 0x00 (0 B) ASCII: SQLite format 3.
53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00

16-byte null-terminated SQLite 3 header string

Byte Offset Length Data Type Field Name Engineering Description
0x00 - 0x0F 16 B char[16] header_string 'SQLite format 3\0'
0x10 - 0x11 2 B uint16_be page_size Database page size in bytes (1 means 65536)
0x12 - 0x13 2 B uint8[2] journal_versions 1=Rollback journal, 2=WAL mode
0x1C - 0x1F 4 B uint32_be page_count Total pages in database file
0x38 - 0x3B 4 B uint32_be text_encoding 1=UTF-8, 2=UTF-16le, 3=UTF-16be
Upload Gateway & AppSec Advisory

.sqlite Security & Polyglot Risk Matrix

Risk Level: medium
Arbitrary Code / Macros
NO (Inert Data)
Pickle Deserialization
SAFE (No Pickle VM)
XML External Entity (XXE)
NONE
Polyglot Prepend Risk
LOW (Strict 0x00 Magic)
Backend Upload Validation Recommendation

Disable load_extension() and defensive=ON when opening untrusted SQLite files; corrupted shadow tables (FTS3/RTREE) have historically triggered memory corruption in older libsqlite3 builds.

Compiler-Verified Reference Code

Read .sqlite Header & Metadata Without Heavy Dependencies

import struct, sys
with open(sys.argv[1], "rb") as f:
    hdr = f.read(100)
    assert hdr[:16] == b"SQLite format 3\x00"
    psize = struct.unpack(">H", hdr[16:18])[0] or 65536
    pages, enc = struct.unpack(">I", hdr[28:32])[0], struct.unpack(">I", hdr[56:60])[0]
    print(f"SQLite3 page_size={psize}B, pages={pages}, encoding={enc}")
CI/CD & Unit Test Fixtures

Deterministic .sqlite Sample Files & Edge Cases

Open Full .sqlite Sample Matrix & Mutator →
minimalexpect: valid

minimal-users.sqlite

Valid 4096-byte single-page SQLite 3 database with a `users` table and two UTF-8 rows.

↓ Download (12.0 KB)
SHA-256: dee45e02f67ee69f23295ad0de07601253ad41c8da4dfb9cb173e5ebb3b71e50
Exact: 12,288 bytes
curl -fsSL https://fileformat.co/fixtures/v1/sqlite/minimal-users.sqlite -o minimal-users.sqlite \
  && echo "dee45e02f67ee69f23295ad0de07601253ad41c8da4dfb9cb173e5ebb3b71e50  minimal-users.sqlite" | shasum -a 256 -c
realisticexpect: valid

app-telemetry-schema.sqlite

SQLite 3 database whose sqlite_schema B-tree spans interior (0x05) pages across 42 tables plus a ~6KB CHECK-constraint DDL stored on an overflow-page chain.

↓ Download (184.0 KB)
SHA-256: 0ea395a85610cdf41278eff1b123008b580dfd0d5732e96eb419eab56e8e4bc1
Exact: 188,416 bytes
curl -fsSL https://fileformat.co/fixtures/v1/sqlite/app-telemetry-schema.sqlite -o app-telemetry-schema.sqlite \
  && echo "0ea395a85610cdf41278eff1b123008b580dfd0d5732e96eb419eab56e8e4bc1  app-telemetry-schema.sqlite" | shasum -a 256 -c
edge-casePartial B-Tree Pageexpect: parser_error

truncated-half-page.sqlite

Valid 100-byte SQLite header whose first B-tree page is truncated mid-page.

↓ Download (2.0 KB)
SHA-256: 3f7627faa065ed6cd65c4fcccd2cbb8493f9d7330fadd9a68b4ca6fccb0e041c
Exact: 2,048 bytes
curl -fsSL https://fileformat.co/fixtures/v1/sqlite/truncated-half-page.sqlite -o truncated-half-page.sqlite \
  && echo "3f7627faa065ed6cd65c4fcccd2cbb8493f9d7330fadd9a68b4ca6fccb0e041c  truncated-half-page.sqlite" | shasum -a 256 -c

Related Specifications & Alternatives