Data formats

UTF-8 netstring encoder

Frame a JSON array of strings using UTF-8 byte lengths.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

For each string, write its decimal UTF-8 byte count, a colon, the string and a comma. Concatenate the records.

The character é uses two UTF-8 bytes, so its netstring is 2:é,; an empty string is 0:,.

Limits

Strings are encoded as UTF-8 without a BOM. This builds a stream; it does not decode arbitrary binary netstrings or normalize Unicode.