Database & SQL tools

DynamoDB JSON converter

Choose the direction and input shape. Preserve type markers for a reversible conversion.

DynamoDB JSON converter

Input JSON

Result JSON

Processing stays in this browser. Input is not sent to a server.

Conversion options

Preserve mode uses custom $ddb markers for sets and binary; $ddb.M escapes a literal marker-shaped map.

Limits: 500,000 input characters, 50,000 nodes, 32 document levels, 2,000,000 output characters.

Result is out of date. Convert the current input.

A DynamoDB JSON converter helps when a CLI response is covered in S, N and M descriptors, but your fixture or review needs readable values. Select the actual payload shape first: an item map, an array of items, or one AttributeValue.

The SDK operations marshall and unmarshall map types rather than merely deleting every type key. A number is transmitted as a string, a list is ordered, and a set has its own semantics. This page makes those choices visible before you use the result.

Why use this DynamoDB JSON converter?

Keep the digits and the number type

The DynamoDB JSON converter reads numeric tokens without a JavaScript Number intermediary. An identifier such as 9007199254740993 remains an unquoted JSON number with the same digits. Decimal range checks also happen without floating-point rounding.

A long row of colored numeric tokens passes through a conversion gate unchanged.

Keep enough information to come back

Preserved mode wraps sets and binary values in explicit $ddb markers. Plain mode produces familiar arrays and Base64 strings and lists each changed type by path. You can choose readability for another consumer without mistaking it for a reversible export.

A tagged collection keeps its badge on the reversible route; the plain route shows an untagged array.

Choose the payload, then the type policy

01

Copy the value inside the response

For GetItem, copy the value of Item and choose Item map. For a query, copy the Items array and choose Batch. Single value expects one descriptor such as {"N":"42"}. The tool never guesses from a field name.

02

Match the receiving application

Keep Preserve types when you plan to convert back here. Choose Plain JSON when the destination requires arrays and strings, then inspect every reported loss path. In the opposite direction, ordinary arrays always become L and strings always become S.

03

Check freshness before exporting

Changing direction, shape, indentation or text immediately locks old exports. Automatic mode refreshes after 350 ms. Turn it off to use Convert or Ctrl/Cmd + Enter. Example and Clear offer a preview; Undo restores both editors and their previous validity.

Inspect the complete attribute structure

Ten descriptors, including nested values

S, N, B, BOOL and NULL are supported together with M, L, SS, NS and BS. Lists may contain mixed types. Empty strings, binary values, maps and lists survive conversion; a null remains a null rather than disappearing from its parent.

Item maps and atomic batches

The same converter handles one record or a JSON array of records. A failure in any batch member blocks the entire export. Real attributes named S, N, Item or Items remain ordinary attribute names because the input shape is an explicit selection.

Exact decimal and set validation

Numeric strings are checked for up to 38 significant digits and the supported nonzero magnitude. NS members 1 and 1.0 count as duplicates. String sets compare exact strings, and binary sets compare decoded bytes. Invalid sets are rejected, never silently deduplicated.

Diagnostics follow the offending token

Syntax and semantic errors show a source path, line and column and highlight the input line. Plain output includes a separate table of affected set and binary paths, shown in groups of 50. Copy and JSON download always contain the full current result.

Where JSON and DynamoDB differ

The $ddb format belongs to this tool
Preserve types uses {"$ddb":{"SS":["red"]}} and equivalent B, NS and BS markers in value positions. A real map containing only a $ddb key is escaped with $ddb.M and its original attribute map. These markers are not an AWS wire format; use the reverse direction before sending AttributeValue data.
Plain output cannot infer lost types
A plain array cannot say whether it was L, SS, NS or BS. A Base64-looking string cannot prove it was B. Plain mode reports those changes, and the reverse direction chooses L and S. It also treats $ddb as a normal object key instead of a marker.
Precision is a property of the exported text
Output retains exact numeric tokens; a later JSON.parse in JavaScript can still round a large integer. Numbers must have at most 38 significant digits, with nonzero absolute values from 1e-130 through the 38-digit maximum below 1e126. Non-JSON numeric spelling in N is normalized exactly.
Strict JSON and bounded local processing
Input is limited to 500,000 UTF-16 code units and 50,000 syntax nodes; DynamoDB documents permit 32 container levels here. Output is capped at 2,000,000 characters. Duplicate keys, empty or duplicate sets, invalid Base64 and lone surrogates stop conversion. No truncation or automatic repair is performed.
No AWS request or table validation
Paste only the chosen payload. Item/Items wrappers, streams, JSONL and S3 export lines are not unpacked. No credentials, URL fetching, uploads or writes are provided. Conversion does not validate your table keys, indexes or the 400 KB stored-item limit; an empty non-key value may be invalid as a key.

DynamoDB JSON converter FAQ

How to convert DynamoDB JSON to a regular Javascript object

Choose DynamoDB → JSON and Item map for an object whose property values are AttributeValue descriptors. For a single {"S":"text"} value select Single value. The result is JSON text; type markers appear only when Preserve types needs information that JSON itself cannot represent.

Why does my large number become a string?

Some converters quote large numbers to avoid IEEE-754 rounding. This tool instead keeps the original number token unquoted and checks it with decimal arithmetic. The text stays exact, but the next application must also use a parser capable of preserving that precision.

Can I convert Sets and Binary values?

Yes. B, SS, NS and BS are validated and retained as explicit markers by default. In Plain JSON mode they become strings or arrays, and a visible list identifies every affected path. Reversing that plain output cannot recover the original special types.

Can I convert a whole table export?

A JSON array of item maps works in Batch mode within the input and node limits. An AWS S3 table export usually contains JSONL records wrapped in Item and is not accepted directly. Extract or prepare a bounded item array first; one malformed member stops the whole conversion.

How to simplify aws DynamoDB query JSON output from the command line?

Copy the value under Item or the array under Items from the CLI response, then choose the corresponding shape. The converter does not remove response metadata or select fields for you. The JSON to DynamoDB direction handles a normal object when a low-level request needs tagged values.

Need a type case explained?

Inspect a sample before converting

Use the DynamoDB JSON converter with the included mixed-type record, then select the representation your next application actually expects.