Rich Text to Portable Text Converter - ContentWrap
Rich Text to Portable Text Converter
Convert rich text from Google Docs, Word, Notion, or any WYSIWYG editor to Sanity-ready Portable Text JSON. No more losing formatting during content migration.
You've spent hours perfecting content in Google Docs, Word, or your favorite editor. The formatting is perfect: bold emphasis where needed, properly structured lists, carefully placed links. Then you paste it into Sanity Studio and watch everything break. The formatting disappears, lists become jumbled paragraphs, and links vanish into plain text.
The problem: Rich text editors use HTML under the hood, but Sanity needs Portable Text. Portable Text is a JSON-based format that preserves structure and meaning, not just visual styling. Manual conversion means recreating every format, rebuilding every list, and re-adding every link. For a single article, that's 20-30 minutes wasted. For a content library, it's days of mindless work.
Our free Rich Text to Portable Text converter preserves all your formatting during migration. Just paste your formatted content, click convert, and get perfectly structured Portable Text JSON ready for Sanity. Works with content from Google Docs, Microsoft Word, Notion, WordPress editors, and any WYSIWYG tool.
Why Rich Text to Portable Text Conversion Is Critical
Every modern content tool—from Google Docs to WordPress—stores formatted text as HTML behind the scenes. When you make text bold in Google Docs, it wraps it in <strong> tags. When you create a list in Word, it generates <ul> and <li> elements. This HTML-based approach works great for display, but it's a nightmare for structured content management.
The Format Incompatibility Problem
Rich text HTML is designed for presentation:
index.html
<p>This is <strong>important</strong> text with a <a href="https://example.com">link</a>.</p><ul> <li>First item</li> <li>Second item</li></ul>
But Sanity's Portable Text is designed for structure and meaning:
Manual conversion requires understanding both formats and painstakingly reconstructing every element.
Who Needs Rich Text to Portable Text Conversion?
Content Migration Teams
Organizations moving from WordPress, Drupal, or traditional CMSes to Sanity face a massive challenge: thousands of articles formatted in rich text editors need conversion to Portable Text. Manual migration costs $50,000+ in labor for large sites.
Real Impact: A media company with 5,000 articles saves 2,500 hours (6 months of work) using automated conversion.
Marketing Teams Using Google Docs
Most marketing teams draft content in Google Docs or Word before publishing. But copying from these tools into Sanity strips all formatting, requiring manual recreation of every bold, italic, link, and list.
Real Impact: Marketing teams waste 5 hours weekly on reformatting—that's 260 hours annually.
Documentation Teams
Technical writers working in Confluence, Notion, or GitBook need to preserve complex formatting—code blocks, nested lists, tables, and callouts—when moving to Sanity.
Real Impact: A documentation team reduced migration time from 2 hours to 5 minutes per article.
Digital Agencies
Agencies managing multiple client migrations need reliable, fast conversion that preserves formatting integrity across different source systems.
Real Impact: Agencies report 80% reduction in migration project timelines.
What Our Rich Text Converter Handles
Complete Formatting Support
Text Styles - Bold, italic, underline, strikethrough
Headings - All levels (H1-H6) with proper hierarchy
Lists - Ordered, unordered, and nested lists
Links - External, internal, and mailto links
Blockquotes - Preserved with proper structure
Code - Inline code and code blocks
Source Compatibility
Google Docs - Direct paste from docs
Microsoft Word - Online and desktop versions
Notion - Rich text blocks
WordPress - Classic and Gutenberg editors
Medium - Article content
Confluence - Wiki pages
Any WYSIWYG - TinyMCE, CKEditor, Quill, etc.
How Rich Text Conversion Works
Step 1: Parse HTML Structure
The converter analyzes the HTML generated by rich text editors, identifying:
Block-level elements (paragraphs, headings, lists)
Inline formatting (bold, italic, links)
Nested structures (lists within lists)
Special elements (images, tables, embeds)
Step 2: Build Portable Text Tree
Each HTML element is transformed into its Portable Text equivalent:
<p> → Block with style "normal"
<strong> → Span with mark "strong"
<a> → Span with link annotation
<ul>/<li> → Block with listItem "bullet"
Step 3: Generate Valid JSON
The converter ensures:
Unique keys for every block and span
Proper mark definitions
Valid parent-child relationships
Correct ordering and nesting
Common Conversion Challenges Solved
Nested Formatting
Problem: Multiple overlapping formats like bold italic links
Solution: Intelligent mark stacking preserves all formatting layers
Solution: Recursive parsing maintains proper list hierarchy
Inline Images
Problem: Images embedded in paragraphs need special handling
Solution: Automatic extraction and conversion to image blocks
Custom Styles
Problem: Editor-specific styles don't map to Portable Text
Solution: Smart fallbacks to closest semantic equivalent
Using Your Converted Content
Direct Studio Import
Copy the generated Portable Text JSON
In Sanity Studio, open your document
Click the three-dot menu in the Portable Text field
Select "Paste Portable Text"
Paste and save
Advanced Features Coming Soon
Bulk Conversion (Q1 2026)
Process multiple documents simultaneously
Maintain document relationships
Preserve metadata and properties
Direct API integration
Why Choose ContentWrap's Converter?
Built on Migration Experience
We've migrated millions of words from every major platform to Sanity. Our converter handles edge cases others miss.
Format Preservation
Unlike basic converters that strip formatting, we preserve the intent and structure of your original content.
Developer-Friendly
Generated JSON is properly formatted, validated, and ready for both Studio and API use.
HTML to Portable Text Converter
Transform HTML from WordPress, Drupal, or any CMS into clean, structured Portable Text JSON. Perfect for large-scale CMS migrations and legacy content modernization.
Start typing or use the toolbar to format your text...