Skip to content

Read your data without BaseStudio

How to inspect, query, and export your BaseStudio Markdown notes (.base) and SQLite databases (.basestudio) using standard tools — no BaseStudio required.

BaseStudio is closed-source desktop and plugin software, but your data is never locked inside a proprietary format. If you delete BaseStudio tomorrow, every record, property, note body, and attachment stays readable with ordinary tools already on your machine.

A vault Base stores nothing outside your folder:

  • Each record is a standard .md Markdown file with YAML front matter.
  • The Base definition (filters, views, formulas, column types) is a plain-text .base YAML file that Obsidian Bases opens directly.

You can inspect or search every record from any terminal or text editor:

Terminal window
# Inspect one record
cat Projects/"Website redesign.md"
# Query every record's status across the folder
grep -n '^status:' Projects/*.md
# Open the Base definition itself
cat Projects/Projects.base

Because every record is a plain file, git, ripgrep, Obsidian, VS Code, or any script can read and archive your vault without installing BaseStudio.

Option 2: Single-file databases (.basestudio)

Section titled “Option 2: Single-file databases (.basestudio)”

A .basestudio file is a standard SQLite 3 database (PRAGMA application_id = 0x42534442, ASCII BSDB, schema version 5). It even carries a plain-text specification of its own schema inside the meta table so future-you does not need these docs to read it.

1. Read the built-in format guide inside the file

Section titled “1. Read the built-in format guide inside the file”
Terminal window
sqlite3 ~/Documents/Projects.basestudio "SELECT value FROM meta WHERE key = 'format';"

That single query prints the table layout, view names, and rules embedded in every .basestudio file.

BaseStudio creates a convenience SQL view called notes that excludes trashed rows (deleted_at IS NULL) and returns each record’s path, full Markdown source (YAML front matter + body), parsed JSON properties, and timestamps:

Terminal window
sqlite3 -header -column ~/Documents/Projects.basestudio \
"SELECT path, json_extract(properties, '$.status') AS status, updated_at
FROM notes
ORDER BY updated_at DESC
LIMIT 10;"

To read the complete Markdown file (front matter + body) of a record:

Terminal window
sqlite3 ~/Documents/Projects.basestudio \
"SELECT source FROM notes WHERE path LIKE '%Website redesign.md';"

3. Inspect every table and .base definition

Section titled “3. Inspect every table and .base definition”

A .basestudio file can hold multiple tables (Bases). The main table’s .base YAML lives in meta, and any additional tables live in bases:

Terminal window
# Main Base YAML definition and path
sqlite3 ~/Documents/Projects.basestudio \
"SELECT key, value FROM meta WHERE key IN ('basePath', 'base');"
# Additional tables in a multi-table database
sqlite3 ~/Documents/Projects.basestudio \
"SELECT path, updated_at FROM bases ORDER BY path;"

4. Inspect version history, trash, and attachments

Section titled “4. Inspect version history, trash, and attachments”
Table / View What it holds
notes (view) All live records (deleted_at IS NULL): path, source (full Markdown), properties JSON
records All records including trashed rows (deleted_at IS NOT NULL)
meta Key/value metadata: base, basePath, format, seq
bases Additional .base YAML definitions in a multi-table database
record_versions Earlier saved versions of each record (up to 50 per record)
base_versions Earlier saved versions of .base definitions
attachments Binary files (path, mime, size, data BLOB) linked by records
registers Per-field hybrid logical clock values used to merge concurrent edits across sync services

To list stored attachments or inspect older versions of a record:

Terminal window
# List attachments stored inside the database
sqlite3 -header -column ~/Documents/Projects.basestudio \
"SELECT path, mime, size FROM attachments ORDER BY path;"
# List earlier versions of a record
sqlite3 -header -column ~/Documents/Projects.basestudio \
"SELECT seq, path, saved_at FROM record_versions ORDER BY seq DESC LIMIT 10;"

5. Export every record and attachment to plain files with Python

Section titled “5. Export every record and attachment to plain files with Python”

If you no longer have BaseStudio installed and want to unpack a .basestudio file into an ordinary folder of Markdown notes, .base files, and attachments, Python’s built-in sqlite3 module does it in ~25 lines:

import pathlib, sqlite3, sys
db_path = pathlib.Path(sys.argv[1])
out_dir = pathlib.Path(sys.argv[2])
conn = sqlite3.connect(db_path)
def write_file(rel_path: str, data: str | bytes) -> None:
target = out_dir / rel_path
target.parent.mkdir(parents=True, exist_ok=True)
if isinstance(data, bytes):
target.write_bytes(data)
else:
target.write_text(data, encoding="utf-8")
meta = dict(conn.execute("SELECT key, value FROM meta WHERE key IN ('basePath', 'base')"))
if "basePath" in meta and "base" in meta:
write_file(meta["basePath"], meta["base"])
for path, source in conn.execute("SELECT path, source FROM bases"):
write_file(path, source)
for path, source in conn.execute("SELECT path, source FROM notes"):
write_file(path, source)
for path, blob in conn.execute("SELECT path, data FROM attachments"):
write_file(path, blob)

Run it with:

Terminal window
python3 unpack_basestudio.py ~/Documents/Projects.basestudio ./exported-projects

Note on .bschanges files: While BaseStudio is open, recent edits may briefly sit in a sidecar Name.<id>.<writer>.<session>.bschanges file beside the .basestudio database before folding in (after 30 seconds of idle time or on close). Close BaseStudio — or use File → Save a copy… — before archiving a .basestudio file so every change is folded into the SQLite file.