XHS-TextCard: Open-Source Free Xiaohongshu Text Card Generator

XHS-TextCard: Open-Source Free Xiaohongshu Text Card Generator 134

An open-source text card generator built for Xiaohongshu (RED) creators. It converts Markdown content into high-resolution images, supports smart pagination, and includes 12 built-in templates. Runs purely client-side and supports batch export of series images in 1242×1660 size.

#创作工具 #排版编辑

XHS-TextCard: Open-Source Free Xiaohongshu Text Card GeneratorIntroduction

XHS-TextCard is an open-source text card generation tool, mainly aimed at Xiaohongshu (Little Red Book) creators. It can convert Markdown content into high-definition images, supports intelligent pagination, and comes with 12 built-in templates. Because it runs purely on the front end locally, it is relatively safe in terms of privacy, and can batch-export image series at 1242×1656 resolution.

The project is open-sourced and maintained by developer geekfoxcharlie (Xiaohongshu: 极客狐), under the MIT license. The entire architecture is pure front end, with no backend, and it does not upload data to servers. Markdown parsing, pagination, Canvas rendering, and image export are all completed locally in the browser, with no network dependency and full offline support.

XHS-TextCard official site screenshot

Features

  • Markdown long-form to images: Supports headings, bold, highlight (==highlight==), italics, strikethrough, code blocks, centered blocks (::: center ... :::), and other common syntaxes. Long texts can be directly converted into multiple images.

  • Intelligent pagination: TextSplitter automatically finds suitable places to split, prioritizing splits between paragraphs; if you want to force a page break, just type ---.

  • 12 templates: Built-in styles include Retro Polaroid, Efficiency Note, Book Page, Apple Memo, Zurich Studio, Minimalist Magazine, and more. Switch with a single tap.

  • Pixel-level Canvas rendering: Instead of unstable DOM approaches, it uses Canvas directly to draw and output 1242×1656 images. The 3:4 ratio is perfect for Xiaohongshu.

  • Deep visual customization: Font size, line height, letter spacing, and padding are all adjustable. Backgrounds can use solid colors or gradients, with Morandi color presets, and direct HEX or RGBA input is supported.

  • Brand signature & anti-theft watermark: Provides several signature styles including Terminal Geek, Capsule, Serif, and Frosted Glass. Background watermarks with adjustable opacity are also supported.

  • Cover design: Cover title, font, and layout can be customized, making it easy to build a coherent series.

  • Convenient export: Single image download is supported, as well as one-click ZIP batch export. Parameters are automatically remembered, keeping a consistent style across a series.

Use Cases

  • Knowledge bloggers splitting long-form dry content into multi-image notes

  • Reading notes and book quotes turned into visual cards

  • Unified typography and publishing for brand or personal IP series content

  • Handling privacy-sensitive content (such as unpublished manuscripts or internal materials) without needing internet access

  • Tutorials and guide-style long-form content displayed with structured pagination

XHS-TextCard Pros & Cons

DimensionProsCons
Privacy & SecurityPure local operation; content is not uploaded to the cloud and is cleared when the browser is closedNo cloud sync; files must be manually migrated across devices
CostOpen-source and free, with no feature limitsAdvanced AI typography and API automation require the official online paid version
PerformanceReal-time preview in milliseconds; smooth response with large textsBrowser memory usage is high with very long texts or complex layouts
CustomizationOpen-source and can be redeveloped; template-configuration-driven and easy to extendDeep template customization requires a certain front-end foundation
Offline CapabilityFully usable offline after cloning the repoFirst-time deployment requires starting a local server; cannot be opened by double-clicking HTML directly

FAQ

  • Why can't I use it by double-clicking the HTML file? Browser security policies (CORS) restrict it; it must be accessed via a local server. It is recommended to run python -m http.server 8000, then visit localhost:8000/editor.html.

  • Why is there no AI smart typography in the open-source version? AI typography, Feishu batch processing, and API automation are cloud-enhanced features of the official online version (xhs-textcard.site). The open-source local version only handles rendering and export.

  • How do I force a page break at a specific spot? Enter --- (three hyphens) at the desired break point, and the system will force a split there.

  • How do I keep a consistent style across a series? After adjusting the parameters, the tool automatically remembers the configuration. You can simply apply the same template directly for subsequent content.

  • What if the exported images look blurry? The tool outputs PNG/JPEG at 1242×1656 by default. If they look blurry after download, they were likely compressed by WeChat or QQ. It is recommended to save the original image.

How to Use XHS-TextCard

Online use: Visit the official online version at xhs-textcard.site, paste your copy, and you can format it directly.

Local deployment:

git clone https://github.com/geekfoxcharlie/XHS-TextCard.git
cd XHS-TextCard
python -m http.server 8000
# Open http://localhost:8000/editor.html in your browser
  1. Edit content: Enter Markdown text in the editor on the left. Use two newlines for intelligent paragraph splitting, --- for forced page breaks, and ::: center ... ::: for centered blocks.

  2. Choose a template and adjust parameters: Pick a template in the style panel on the right, and fine-tune colors, fonts, signatures, and watermarks in the style area.

  3. Preview & export: Watch the real-time preview in the center area. Once confirmed, you can download images individually or package them all into a ZIP for one-click export.

XHS-TextCard vs. Competitors

ComparisonXHS-TextCardRedbookcardMocCard
Open-source LicenseMIT, free for commercial use and modificationOpen source (GitHub)Mostly closed-source or SaaS
Operation ModePure front-end local / Official online versionPure front-end localPrimarily cloud-based
Privacy ProtectionNot uploaded; processed locallyProcessed locallyRequires uploading content to servers
AI TypographySupported in online version; not in local versionNot supportedPartially supported
Number of Templates12 master-level templatesBasic templatesRich templates, but many are paid
Markdown SupportFull support (including highlight, centered block)Basic supportPartial support or rich text only
HD Output1242×1656 Canvas renderingStandard sizeDepends on the platform
Batch ExportOne-click ZIP packagingMostly single imagesPartially supported
CostLocal version is completely freeFreeAdvanced features mostly require subscription
Last updated: May 25, 2026

Tools related to XHS-TextCard: Open-Source Free Xiaohongshu Text Card Generator