Skip to main content

Structured Data

AMF Encoder

Transform structured data with AMF Encode and review the valid output. Enter the data, choose the formatting options, then validate and copy the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

You can run the tool again after any change.

Options

Your result appears here

Transform structured data with AMF Encode and review the valid output. Enter the data, choose the formatting options, then validate and copy the result.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

AMF Encoder: Encode one JSON value as AMF0 or AMF3 binary data in your browser. Select the version your receiving application expects. Download the resulting bytes as amfencode.bin.

The result is one binary AMF value. The download contains exact encoded bytes; its .bin extension does not identify the selected AMF version.

  • Create binary fixtures from JSON strings, finite numbers, booleans, null, arrays, or anonymous objects.
  • Encode "é" as AMF0 bytes 02 00 02 c3 a9, with a two-byte UTF-8 string length.
  • Build an AMF Encoder and AMF Decoder recipe with matching versions to check supported JSON values.

Sources: Adobe AMF0 specification; Adobe AMF3 specification

Instructions

  1. Enter a JSON value. Surround strings with double quotes, for example "é".
  2. Choose Format: AMF0 or AMF3. AMF3 is the default.
  3. The tool updates the result after you change the input or format.
  4. Download amfencode.bin to save the binary result. Select the same version when using AMF Decoder.

Example

Input: "Ada"

Settings: Format: AMF3 (the default)

Result: A 5-byte .bin file with the bytes 06 07 41 64 61

Choose AMF0 to get 02 00 03 41 64 61. AMF0 stores the string length in two bytes.

Limits

  • The input is parsed JSON. Numbers use JavaScript precision, and duplicate object keys can collapse during parsing.
  • AMF0 output allows at most 1 MiB (1048576 bytes), 10000 values including containers, and 64 nested levels.
  • AMF0 property names allow at most 65535 UTF-8 bytes. Longer string values use the AMF0 long-string marker.
  • AMF0 rejects nonfinite numbers, malformed Unicode, cyclic values, and values outside the supported JSON types.
  • Both formats write inline values. This tool does not create message envelopes, typed objects, dates, XML values, or reference graphs.
  • AMF0 and AMF3 use different binary representations. A successful download does not prove compatibility with every receiving application.