title: Data Encoding
role: manual
tags: #api #manual #reference #zettelstore
syntax: zmk
back: 00001012920500
backward: 00001012920500
box-number: 1
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20260303142542
forward: 00001012920516 00001012921200 00001012930000
lang: en
license: EUPL-1.2-or-later
modified: 20260303163611
published: 20260303163611
visibility: public

The data encoding represents the zettel as a special [symbolic expression](00001012930000).
In contrast to the similar-looking [sz encoding](00001012920516), a much simpler structure is used.

If transferred via HTTP, the content type will be `text/plain; charset=utf-8`.

A full zettel, both metadata and content, is encoded by the list



If you only want to encode the metadata of a zettel, the following format will be used:



# Metadata

Metadata is basically a sequence of key / value pairs:



Each *Key* is a symbol, derivied from the metadata key.
The *Value* is a string containing the value of the corresponding metadata entry.

# Access rights

This element encodes [access rights](00001012921200) of a zettel:



# Content encoding

The content encoding specifies, how the zettel content is encoded.
Currently, two values are supported: the empty string and the string `"base64"`.



The empty string indicates that the content is not encoded and can be used as is.
`"base64"` indicates that the content string is Base64-encoded (typically used for binary content).

# Content

The content of a zettel is always encoded as a readable string.
For binary content, it is first encoded using Base64.

