Structured Flat Data

SFlat is a schema-first flat-file format for typed, deterministic data.

SFlat is a human-readable, line-oriented alternative to CSV for data that needs explicit types, a self-describing schema, integrity checks, and support for binary payloads. It keeps files practical to inspect while making serialization predictable across implementations.

Latest draft: v0.2 (October 2026)

UTF-8, LF-only documents start with #!sflat 0.2, followed by header fields, a blank line, and a body of records.

Why SFlat exists

Typed schema

A document declares scalar types such as str(n), bool, int64, decimal(p,s), timestamps, uuid, and bytes.

Human-readable & line-oriented

Files are UTF-8 with LF line endings only, using a simple header block of Key: value lines before the record body.

Built-in integrity

Optional Body-Bytes and Body-Hash fields can verify content, while a sparse Index can support fast seeking.

Payload profile

Beyond typed text rows, the Payload profile adds large strings and binary/BLOB data through base64 and DEFLATE payloads.

Canonical by design

The same logical data serializes identically, making files easier to diff, hash, and compare across implementations.

Explore the format