Migrate from GitBook to Typemark

Sync your space to GitHub and import the repository. Typemark turns GitBook’s blocks into components in a single commit you can review, and your Markdown, images and redirects come along.

Facts about GitBook checked against GitBook's docs (Git Sync, content configuration, plans), November 2026.

Before and after

The same page in your GitBook repository and after the import commit.

Before: getting-started.md, GitBook
---description: Install the SDK.---# Getting started{% hint style="warning" %}Node 18 or later is required.{% endhint %}{% tabs %}{% tab title="npm" %}```bashnpm i @acme/sdk```{% endtab %}{% endtabs %}
After: getting-started.mdx, Typemark
---title: Getting starteddescription: Install the SDK.---<Warning>Node 18 or later is required.</Warning><Tabs><Tab title="npm">```bashnpm i @acme/sdk```</Tab></Tabs>

Steps

  1. Step 1: Sync your space to GitHub

    In GitBook, set up Git Sync for the space with a new, empty GitHub repository, and make GitBook the source of truth for the first sync so your pages are written to the repository. Do this for each space you want to bring.

  2. Step 2: Import the repository

    In Typemark, create a project and choose Import from GitHub. (Already have a project? Use Settings → GitHub → Connect.) Pick the repository and you’ll see “GitBook space detected”.

  3. Step 3: Review the conversion commit

    Typemark converts your space in a single commit: it adds a typemark.json with your navigation, renames your pages from .md to .mdx and turns GitBook blocks into components. Then it builds the site and shows a summary of anything left for you to do.

  4. Step 4: Turn off GitBook’s Git Sync

    Disconnect Git Sync in GitBook so it stops writing to the repository. From now on, edit in Typemark or push to GitHub.

  5. Step 5: Go live

    A new project stays offline until you’re ready. Add your domain, then click Go live in Settings → Publishing.

What converts

  • SUMMARY.md: ## headings become groups, links become pages
  • Nested pages, flattened into their group (partly)
  • Redirects from .gitbook.yaml
  • The first H1, as the page title
  • Hints: info, success, warning, danger → Info, Check, Warning, Danger
  • Tabs → Tabs, stepper → Steps
  • Code block titles
  • Expandable blocks (<details>) → Accordion
  • Columns → Columns, cards tables → CardGroup
  • Figures, as images
  • Links to .md pages, rewritten
  • .gitbook/assets moved to images/, every link updated
  • Includes, inlined into each page (partly)

What doesn’t carry over

None of these will stop the import. Each one shows up in the import summary, or takes a small step of its own.

Organization-level OpenAPI specs
Add the spec file to the repository and reference it in typemark.json to generate the API pages.
Visitor authentication
GitBook’s sign-in for private docs doesn’t come across.
Integrations
These stay in GitBook. Set up analytics and similar tools again in Typemark.
Other spaces and variants
Only the space in the repository, and its default variant. Import each space as its own project.
Blocks Typemark doesn’t know
Left as they are and listed in the import summary.

From your terminal

Would you rather not connect GitHub? Run the same conversion on a copy of the synced repository and publish from your terminal.

Terminal
npm install -g @gettypemark/clicd my-gitbook-repotypemark logintypemark migrate  # detects GitBook, then offers to create and push

With your coding agent

Let Claude Code, Codex or Cursor finish the job.

Got several spaces, custom HTML or a few things the import flagged? Hand the repository to your coding agent. It runs on your computer under your own account, follows our GitBook guide and keeps checking its work until the site builds cleanly.
npm install -g @gettypemark/clitypemark migrate --from gitbook --agent claude  # or codex, cursor, gemini

Using another agent? typemark migrate --guide prints the guide so you can paste it in.

Questions

Do I need a paid GitBook plan to export?
No. GitBook lists Git Sync with GitHub or GitLab on its Free plan, and it’s the way to get your pages out as Markdown: GitBook has no direct Markdown export in the app.
My space syncs to GitLab. Does that work?
The import reads GitHub repositories. Sync the space to a GitHub repository for the move, or clone your GitLab repository and use the Typemark CLI: typemark migrate converts it locally and typemark push publishes it.
I have several spaces. What happens?
One import brings one space. Import each space as its own Typemark project: Typemark Pro includes unlimited projects.
Will GitBook overwrite my changes after the import?
Not once you turn off Git Sync in GitBook, which is the step right after the import. Until then, GitBook keeps writing to the repository.
Can I see exactly what the import changed?
Yes. The conversion is one Git commit in your repository, so you can read the diff on GitHub, and revert it if you want to start again.

Still deciding? Compare Typemark and GitBook side by side.

Bring your GitBook space over.

Import the synced repository and look over the changes. Nothing goes public until you click Go live.

14-day Pro trial, no card. Your content stays in Git.