Free tool · no sign-up · runs in your browser · Step 2 of 4: Convert
HTML or Markdown to Payload, Strapi and DatoCMS rich text
Paste the HTML or Markdown of an article, or pick one column of a CSV file. Get Payload Lexical JSON, Strapi 5 Blocks or DatoCMS Structured Text back, with a count of each kind of element left out or changed and a list of the images. No Payload, Strapi or DatoCMS project needed.
For developers and content teams moving articles into a headless CMS. The tool reads only what you paste or the file you pick. It does not open web addresses, fetch images or connect to your CMS. Nothing is uploaded. The output is a draft to review, not a finished import.
Draft to review: checked against the documented format, not imported. We did not load it into a Payload, Strapi or DatoCMS project. It goes into a richText field of a Payload collection that uses the Lexical editor with its default features. Written: Paragraphs, headings, lists inside lists, quotes, dividers, line breaks, links with their new-tab setting, bold, italic, underline, strikethrough, inline code, superscript and subscript, and images as upload nodes with placeholder ids. Not written: Tables (each row becomes a paragraph), code blocks (written as paragraphs with the inline code format), a link's title, the alt text and size of images (the alt text goes to the media list), embeds, Payload blocks and custom editor features.
Image ids in the output are placeholders. You replace each one with the real id after you upload the files to Payload.
0 characters. Converted in this tab as you type. Nothing is uploaded.
What it does
What it does, and what it does not
- Reads HTML and Markdown. Markdown is turned into HTML first and then read the same way: paragraphs, headings, lists, quotes, tables, code blocks, dividers, links, images, and bold, italic, underline, strikethrough, code, superscript and subscript.
- Counts what is lost. Tables, superscript and subscript where the format has none, <del> written as strikethrough, <div> wrappers, embeds, shortcodes kept as plain text, class names, styles and each image, with a count for each. You can download the list as a CSV file.
- Lists the images. The media list has the address of each image tag (img), its alt text, its placeholder id and whether it is in the output, so you know what to upload.
- Checks its own output. Each result is tested against the node types, required fields and nesting rules read from the vendor's own code.
- Free size. Up to 200,000 characters in one paste, or the first 25 rows of a CSV file. This is our own cap, not a vendor limit. With a tools pass this tool runs up to 1,000,000 characters in one paste or 1,000 rows of a CSV file: see the self-serve prices. Larger runs: request access.
What it does not do. It does not upload images or call any CMS. It does not write Payload blocks or custom editor features, Strapi 4 or Strapi's Markdown field, or DatoCMS blocks, inline records and record links. It has no table output in any of the three: each table row becomes a paragraph, and the loss report says so. It is not a full Markdown parser: unusual nesting may be read differently from GitHub. Shortcodes are found by their shape and may be missed or over-counted.
Shopify, Wix, Contentful or Sanity? Use the rich text converter.
The three formats
What each format carries here
Payload Lexical rich text
Open the converter set to Payload Lexical rich text
Written: Paragraphs, headings, lists inside lists, quotes, dividers, line breaks, links with their new-tab setting, bold, italic, underline, strikethrough, inline code, superscript and subscript, and images as upload nodes with placeholder ids.
Not written: Tables (each row becomes a paragraph), code blocks (written as paragraphs with the inline code format), a link's title, the alt text and size of images (the alt text goes to the media list), embeds, Payload blocks and custom editor features.
- Each image becomes an upload node whose value is a placeholder, not a real id. Upload the files to your upload collection first, then replace each placeholder with the id Payload gave that file. The media list maps every image address to its placeholder.
- Pick the id type your database uses: a number (Postgres and SQLite by default) or a string (MongoDB). Payload issue #17344 reports a converter that wrote a string id where the database wanted a number, and the record could not be saved.
- Type the slug of your upload collection (often media). It is written as relationTo on every upload node.
- Version numbers are written as 1. Payload's link and upload nodes do not read them when they load. Node ids are counters, unique inside one output.
- A nested list sits in a list item of its own, after the item it belongs to, as Lexical's list package writes it. Your field's own feature list may allow fewer nodes or formats than the default one.
Strapi 5 Blocks
Open the converter set to Strapi 5 Blocks
Written: Paragraphs, headings, lists inside lists, quotes, code blocks, links, line breaks, bold, italic, underline, strikethrough and inline code, and images as image nodes that hold the address and alt text only.
Not written: Tables (each row becomes a paragraph), dividers, superscript, subscript, a link's title and new-tab setting, links whose address Strapi does not accept (a relative path, a #anchor), and the media fields of images.
- Strapi's own check of a Blocks value also wants name, width, height, hash, ext, mime, size, provider, createdAt and updatedAt on every image. Only Strapi's upload makes those. Upload the files first, then copy each file's fields into its image node, or Strapi will refuse the entry.
- Strapi's check accepts a link address that starts with / or uses http, https, ftp, mailto or tel. Other links are removed and their text is kept, and the loss report counts them.
- A line break inside a paragraph is written as a new-line character in the text. Strapi's pages do not spell this out, so treat it as unverified.
- Strapi has no official converter from HTML or Markdown to Blocks. Its feedback board lists keeping pasted formatting in the Blocks editor as planned.
DatoCMS Structured Text
Open the converter set to DatoCMS Structured Text
Written: Paragraphs, headings, lists inside lists, quotes, code blocks, dividers, line breaks, links with their title and new-tab setting (as link meta), bold, italic, underline, strikethrough and inline code.
Not written: Images (a dast image is a block record of your own project, so images go to the loss report and the media list only), tables (each row becomes a paragraph), superscript, subscript, embeds, and DatoCMS blocks, inline records and record links.
- Your field's own settings may allow fewer nodes, heading levels or marks than the format does. Check the field's validations in DatoCMS.
- A link's title is written as meta with id title, and "open in a new tab" as meta with id target and value _blank.
- DatoCMS's own html-to-structured-text package has no rule for tags such as <del> and <sup>, as its staff said in the DatoCMS community in April 2024. Here <del> becomes strikethrough, and superscript is counted in the loss report.
Other ways
The vendors' own converters
- Payload's own convertHTMLToLexical runs in your code with your Payload editor config and the jsdom package. Its docs say <img> tags are not uploaded automatically: an image is left out unless it already carries the id of an uploaded file. Payload docs: converting HTML to rich text (checked 16 Nov 2026)
- Payload issue #7884 (images dropped when HTML is converted to Lexical) was closed in February 2026. Payload issue #7884 (checked 16 Nov 2026)
- Payload issue #17344, opened in July 2026 and open on 16 Nov 2026, reports that the HTML converter reads an upload id as a string, so a record fails on a database with number ids. Payload issue #17344 (checked 16 Nov 2026)
- DatoCMS's html-to-structured-text package has no rule for tags such as <del> and <sup>, and leaves them out; DatoCMS staff said so in April 2024 and pointed to custom handlers, which are code you write. DatoCMS community thread (checked 16 Nov 2026)
- Strapi's feedback board lists keeping pasted rich text, and turning pasted Markdown into Blocks, as planned. Strapi feedback board (checked 16 Nov 2026)
We know of no official Strapi converter from HTML or Markdown to Blocks.
Questions
Common questions
Is my HTML or Markdown sent to your server?
No. The conversion runs in your browser tab. Nothing you paste and no file you pick is uploaded or stored, and it is gone when you close the tab. We count that the tool was used and which format was chosen, never what you pasted.
What happens to my images?
They are never fetched or uploaded. For Payload, each image becomes an upload node whose id is a placeholder: a number from 900,000,001 up, or a string such as replace-with-media-id-1. You upload the files to Payload, then replace each placeholder with the real id. For Strapi, each image node holds its address and alt text; the other media fields (name, size, mime type and so on) come from Strapi's upload. For DatoCMS, images are not written at all, because Structured Text holds an image only as a block record of your own project. In all three, the media list gives every image address, its alt text and its placeholder.
What does this do that Payload's or DatoCMS's own converters do not?
Those are code libraries you run in your own project: Payload's needs your editor config, DatoCMS's needs custom handlers for tags it has no rule for. This page needs no project and no code, reads Markdown too, and tells you how many of each thing were left out or changed, images included. It is not a replacement for either library or for a test import.
Has the output been tested in Payload, Strapi or DatoCMS?
No. Each format was written from the vendor's own source code and types, read on 16 November 2026, and the tool checks every output against those rules. We did not load the output into a Payload, Strapi or DatoCMS project. Treat it as a draft to review: try one item first.
How much can I convert for free?
One paste of up to 200,000 characters, as often as you like. In a CSV file, the first 25 rows. This is our own cap, not a vendor limit. For more, use the "Larger runs: request access" link.
Sources
Where each format was read
- Payload: default Lexical editor features (lexical/config/server/default.ts) (checked 16 Nov 2026)
- Payload: upload node types (features/upload/server/schema.ts) (checked 16 Nov 2026)
- Payload: link node types (features/link/server/schema.ts) (checked 16 Nov 2026)
- Payload: horizontal rule node (HorizontalRuleNode.tsx) (checked 16 Nov 2026)
- Lexical: text format bit values (LexicalConstants.ts) (checked 16 Nov 2026)
- Lexical: list node types (LexicalListNode.ts) (checked 16 Nov 2026)
- Payload issue #17344: HTML to Lexical writes a string upload id for a number key (checked 16 Nov 2026)
- Strapi 5: the server check of a Blocks value (blocks-validator.ts) (checked 16 Nov 2026)
- Strapi: Blocks node types of the official renderer (BlocksRenderer.tsx) (checked 16 Nov 2026)
- Strapi: text node type of the official renderer (Text.tsx) (checked 16 Nov 2026)
- Strapi feedback: keep pasted rich text in the Blocks editor (planned) (checked 16 Nov 2026)
- DatoCMS: dast node types (structured-text utils, types.ts) (checked 16 Nov 2026)
- DatoCMS: what may sit inside what (structured-text utils, definitions.ts) (checked 16 Nov 2026)
- DatoCMS docs: Structured Text and dast (checked 16 Nov 2026)
- DatoCMS community: html-to-structured-text drops del and sup (checked 16 Nov 2026)
Every output is a draft: checked against the format as read from the vendor's own code, not imported. Surge Migrate is not affiliated with Payload, Strapi or DatoCMS.
Step 2 of 4: Convert
Free tools that go with this one
This tool does one job in the Convert step. Content into the target system's own format. Each result is a draft to review.
- Rich text converterTurns HTML into Shopify rich text metafield JSON, Wix Rich Content, Contentful Rich Text or Sanity Portable Text, with a count of what was left out or changed. A draft to review, not imported.
- WordPress to Markdown converterTurns a WordPress export into Markdown or MDX files for Astro, Hugo, Jekyll or Eleventy, with file paths from each post's own address, shortcodes kept as text or mapped to components, and a redirect list. A draft to review.
- Media manifestLists the images, documents and fonts named in the HTML of a site's pages, shows which sit on a vendor's host and which pages use each, and gives a manifest, a draft curl download list and a draft replace map.
All free tools, by step and by who they are for →
Moving the whole site? Converted automatically. Checked before you install.
Enter your page addresses. Surge Migrate reads the public pages, converts them into the import format of the system you are moving to, and reports what it could not place. You check the result first, then run the import yourself.