Strapi v4 → v5 JSON Converter
Paste a Strapi v4 API response and get clean, flattened Strapi v5 JSON instantly. Everything runs in your browser.
Strapi-Response-Format: v4 in your API request headers to receive legacy formatted responses from Strapi v5.documentId for API operations.{
"data": [
{
"id": 1,
"title": "Getting Started with Strapi v5",
"slug": "getting-started",
"content": "Strapi v5 introduces documentId and unnested responses.",
"author": {
"id": 10,
"name": "Sarah Connor",
"email": "sarah@example.com"
},
"tags": [
{
"id": 101,
"name": "Architecture"
},
{
"id": 102,
"name": "CMS"
}
]
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 25,
"pageCount": 1,
"total": 1
}
}
}01.How the Strapi v4 → v5 Converter Works
- Paste a Strapi v4 REST or GraphQL response into the left editor, drop a
.jsonfile onto it, or click Sample to load an example. - The converter removes the
dataandattributeswrappers from entries, relations, and media so fields sit directly on each entity. - In REST responses, top-level metadata such as
meta.paginationis kept exactly as-is. - Copy the v5-shaped JSON from the right panel in Pretty or Compact format. Entries that still lack a
documentIdare flagged.
02.What Changed in the Strapi v5 Response Format
In Strapi v4, REST responses wrapped each entry’s fields in an attributes object, and every relation or media field in its own data wrapper. Reading an author’s name meant writing response.data.attributes.author.data.attributes.name. Strapi v5 removes both wrappers: fields and populated relations sit directly on each entry, and every entry gets a string documentId alongside the numeric id.
// Strapi v4 response
{
"data": {
"id": 42,
"attributes": {
"title": "Migrating to Strapi v5",
"slug": "migrating-to-strapi-v5",
"author": {
"data": {
"id": 7,
"attributes": { "name": "Sarah Connor", "role": "Lead Architect" }
}
},
"tags": {
"data": [
{ "id": 101, "attributes": { "name": "Architecture" } },
{ "id": 102, "attributes": { "name": "Headless CMS" } }
]
}
}
},
"meta": {}
}
// The same entry from Strapi v5 (Strapi assigns each documentId)
{
"data": {
"id": 42,
"documentId": "hgv1vny5cebq2l3czil1rpb3",
"title": "Migrating to Strapi v5",
"slug": "migrating-to-strapi-v5",
"author": {
"id": 7,
"documentId": "znrlzntu9ei5onjvwfaalu2v",
"name": "Sarah Connor",
"role": "Lead Architect"
},
"tags": [
{ "id": 101, "documentId": "b1mhc8ruzqw4xj2xs2rcf8ug", "name": "Architecture" },
{ "id": 102, "documentId": "tk4l9evp0yx6dqcyn3n7vhd2", "name": "Headless CMS" }
]
},
"meta": {}
}03.Where Your Data Goes
Nowhere. This tool runs entirely in your browser: what you paste or generate is processed in this tab and is never uploaded or stored. The page is also served with a Content Security Policy that limits which servers it can contact.See how to check this yourself →
04.Frequently Asked Questions
How does Strapi v5 handle documentId versus numeric id?
Strapi v5 introduces a string documentId that identifies a document across its draft and published versions, and the v5 APIs use it instead of the numeric id for lookups and updates. The converter keeps numeric IDs as-is and cannot generate a documentId, so it shows a notice when entries are missing one.
Are deeply nested relation arrays and dynamic zones supported?
Yes. The converter recursively processes single relations, relation arrays, media, repeatable components, and dynamic zones. Traversal stops at 200 levels of JSON nesting (dozens of relation levels) so a pathological payload can't crash the page. Anything deeper is passed through unchanged and a partial-conversion notice is shown. Components and JSON fields are only unwrapped when they match the exact v4 data/attributes shape, so custom fields that reuse those key names are left intact.
What happens to pagination metadata (meta.pagination)?
Top-level meta objects, including pagination (page, pageSize, pageCount, total), are preserved without changes. Only the entity payloads inside data are flattened. Note that meta blocks attached to nested relations are dropped when their wrapper is removed, matching the v5 response shape.
Does this tool support Strapi GraphQL payloads or only REST API?
Both. Strapi v4 REST and GraphQL responses use the same data and attributes wrappers, which v5 removes. GraphQL responses that include __typename (as Apollo Client adds) are supported: wrapper-only types like ArticleEntity are dropped and the entry keeps its v5 type name. A GraphQL collection’s meta.pagination is dropped with its wrapper, because Strapi v5 returns pagination from separate _connection queries (for example articles_connection) instead.
Is it safe to paste production responses?
Yes. Parsing and conversion run in your browser, and the converter has no code that sends your data anywhere. Dropped files are read locally and can be up to 10 MB. You can confirm this with the checks on the Security page.