Convert JSON to a DynamoDB BatchWriteItem payload

Paste a JSON array of objects and get a DynamoDB BatchWriteItem request with typed AttributeValues, ready for the AWS CLI, an SDK, or a Lambda. Everything runs locally in your browser.

Try:
BatchWriteItem payload

About this tool

DynamoDB's BatchWriteItem API does not accept plain JSON. Every value has to be wrapped in a typed AttributeValue — strings become { "S": ... }, numbers become { "N": "..." }, booleans become { "BOOL": ... }, and so on. Hand-writing that wrapper for more than a couple of rows is tedious and error-prone.

This tool takes a normal JSON array of objects and produces the full BatchWriteItem request payload for you. Paste your rows, set the target table, choose put or delete, and copy the result into the AWS CLI (aws dynamodb batch-write-item --request-items file://payload.json), an SDK call, or a seeding script. It runs entirely in your browser — nothing is uploaded and no AWS credentials are involved.

What it converts

For put, each object is wrapped as { "PutRequest": { "Item": ... } }. For delete, each object is wrapped as { "DeleteRequest": { "Key": ... } }, so you should include only the key attributes.

Worked example

Input array:

[
  { "id": "user#1", "name": "Ada", "age": 36, "active": true },
  { "id": "user#2", "name": "Grace", "age": 45, "active": false }
]

With table name Users and operation put, the tool returns:

{
  "RequestItems": {
    "Users": [
      {
        "PutRequest": {
          "Item": {
            "id": { "S": "user#1" },
            "name": { "S": "Ada" },
            "age": { "N": "36" },
            "active": { "BOOL": true }
          }
        }
      },
      {
        "PutRequest": {
          "Item": {
            "id": { "S": "user#2" },
            "name": { "S": "Grace" },
            "age": { "N": "45" },
            "active": { "BOOL": false }
          }
        }
      }
    ]
  }
}

Limits & edge cases

FAQ

How do I use the output with the AWS CLI?

Save the result to a file, for example payload.json, then run aws dynamodb batch-write-item --request-items file://payload.json. The tool's output is already shaped as the --request-items value, with your table name as the top-level key.

Why is my number wrapped as a string like `{ "N": "36" }`?

That is exactly how DynamoDB represents numbers. The N AttributeValue type is always a string in the wire format to avoid precision loss, and the SDKs convert it back to a numeric type on read. This tool preserves the original JSON spelling so large integers and decimals survive the round trip.

What should I put in each object for a delete operation?

Only the key attributes. A DeleteRequest is matched by the item's primary key, so include the partition key (and the sort key if your table has one) and nothing else. Extra attributes are still converted, but DynamoDB ignores everything beyond the key when deleting.

Can I mix puts and deletes in one payload?

Not in a single run — the operation setting applies to the whole array. A real BatchWriteItem call can mix PutRequest and DeleteRequest entries, so if you need both, generate a put payload and a delete payload separately and merge the two request arrays for the same table by hand.

How do I handle more than 25 rows?

Split your data into chunks of 25 or fewer and run the tool once per chunk, then send each payload as its own BatchWriteItem call. DynamoDB enforces the 25-item limit per request, so batching is required regardless of which tool builds the payload.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool json-to-dynamodb-batch '[
  { "id": "user#1", "name": "Ada", "age": 36, "active": true },
  { "id": "user#2", "name": "Grace", "age": 45, "active": false }
]' 'table_name=Users'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/json-to-dynamodb-batch/?json=%5B%0A%20%20%7B%20%22id%22%3A%20%22user%231%22%2C%20%22name%22%3A%20%22Ada%22%2C%20%22age%22%3A%2036%2C%20%22active%22%3A%20true%20%7D%2C%0A%20%20%7B%20%22id%22%3A%20%22user%232%22%2C%20%22name%22%3A%20%22Grace%22%2C%20%22age%22%3A%2045%2C%20%22active%22%3A%20false%20%7D%0A%5D&table_name=Users&operation=put&pretty=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.