dynobase-icon
Dynobase

DynamoDB JSON converter

Last updated: October 23rd, 2026

Convert one JSON object to DynamoDB AttributeValue JSON, or paste a DynamoDB item into the right-hand field to decode it. Conversion runs in your browser. Maps and lists retain their structure; sets become arrays and binary values become base64 strings in plain JSON.

What is DynamoDB JSON?

DynamoDB JSON is the typed representation used by the low-level API, not a description of the database's internal storage format. Each attribute value is wrapped in a type descriptor, such as S for a string or N for a number. For instance, { "value": 3 } becomes { "value": { "N": "3" } }.

How to use the converter

  1. Paste one plain JSON object on the left to generate a DynamoDB item.
  2. Paste one DynamoDB item on the right to remove the type descriptors.
  3. Copy the output after checking any error message below the fields.

The left field also accepts object-literal syntax such as unquoted keys, single-quoted strings and trailing commas. It does not execute JavaScript: constructor calls such as new Set() are not accepted. To inspect a GetItem response or stream record, paste only its Item, NewImage or OldImage attribute map, not the full response envelope.

The ten DynamoDB data type descriptors

  • S - String. "hello" becomes { "S": "hello" }
  • N - Number, sent as a string. 3 becomes { "N": "3" }
  • B - Binary, base64 encoded. the bytes for hi becomes { "B": "aGk=" }
  • BOOL - Boolean. true becomes { "BOOL": true }
  • NULL - Null. null becomes { "NULL": true }
  • M - Map, an object. { "a": 1 } becomes { "M": { "a": { "N": "1" } } }
  • L - List, an array. [1, "x"] becomes { "L": [{ "N": "1" }, { "S": "x" }] }
  • SS - String Set. a set of "a" and "b" becomes { "SS": ["a", "b"] }
  • NS - Number Set. a set of 1 and 2 becomes { "NS": ["1", "2"] }
  • BS - Binary Set. a set of byte arrays becomes { "BS": ["aGk="] }

Things that catch people out

  • Numbers travel as strings. { "N": "3" } is correct, { "N": 3 } is not. AWS sends them this way "to maximize compatibility across languages and libraries", and DynamoDB still treats them as numbers for arithmetic.
  • Numbers can be positive, negative or zero, with up to 38 digits of precision. The positive range is 1E-130 to 9.99...E+125 and the negative range mirrors it. Exceeding 38 digits raises an exception, and leading and trailing zeroes are trimmed. A JavaScript number cannot represent that whole range, so this tool shows such values rounded, with a warning, and refuses a number set whose members would round to the same value. Keep high-precision values as DynamoDB N strings or use a decimal-aware SDK for exact conversions.
  • Sets are not lists. SS, NS and BS hold unique, unordered values of a single type, and they cannot be empty. Plain JSON has no set type, so this tool shows them as arrays. Converting that array back gives you an L, not a set. Binary loses its type the same way: B is shown as its base64 text, and converting back gives you an S.
  • NULL takes the value true, which reads oddly. { "NULL": true } means the attribute is null.
  • Binary is base64 encoded in JSON, so B and S can look identical on the wire. The type key is the only thing that distinguishes them.
  • Empty strings and empty binary values are allowed, as long as the attribute is not a table or index key, and they are also allowed inside a set, list or map. What is not allowed is an empty set itself. Empty lists and maps are fine.
  • Lists and maps can be nested within each other up to 32 levels deep.

For application code, JavaScript SDK v3 provides marshall and unmarshall in @aws-sdk/util-dynamodb. Its document client accepts native values directly. See the JavaScript examples and the AWS AttributeValue reference for the wire format.

Frequently Asked Questions

Is DynamoDB JSON the same as ordinary JSON?

DynamoDB JSON is valid JSON with explicit type descriptors around attribute values. For example, a Number uses N with a string value. Plain JSON has no distinct set or binary type.

Will a conversion preserve sets and binary types?

The plain JSON display represents SS, NS and BS as arrays, and binary values as base64 strings. Converting that plain output back produces lists and strings, so retain the original DynamoDB JSON when those types matter.

Why does the converter round a large number?

DynamoDB supports up to 38 digits of numeric precision, but JavaScript numbers hold about 15 to 17 significant digits. The converter shows a value like that rounded, with a warning, and refuses a number set whose distinct members would round to the same value. Use a decimal-aware SDK when you need the exact digits.

Can I paste a list of items or a complete AWS response?

Paste one item object at a time. For GetItem or stream responses, extract the Item, NewImage or OldImage attribute map before converting. A Query response's Items array is not itself a DynamoDB item.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase