Docs menuImport and export

// docs · sync and data

Import and export

Export your library as JSON, import a Snipstack export, and what each one includes.

Snipstack reads and writes one format: its own JSON export. Other formats (Gists, VS Code snippets, CSV) are not supported.

Export

Settings > Data > Export all snippets > Export JSON, or the palette action Export library as JSON…. Choose where to save; the suggested name is snipstack-export-YYYY-MM-DD.json.

The file holds:

  • every folder and tag;
  • every snippet with its title, description, folder, kind, favorite star, tags and fragments (name, language, text);
  • each variable’s name, description and default.

It does not hold:

  • snippets in the Trash (a snippet whose folder is in the Trash is exported without a folder);
  • usage counts, settings, the database URL or token, conflict copies and sync data;
  • remembered variable values, unless you tick Include remembered values. They can hold secrets, so the box starts unticked every time.

The file is readable, indented JSON.

Import

Settings > Data > JSON file > Choose file…, the palette action Import snippets from JSON…, or Import existing snippets… in the welcome wizard. The file can be up to 100 MB.

Importing never overwrites your library:

  • Snippets that are not in your library yet are added.
  • Snippets you already have, unchanged, are skipped.
  • If your copy differs from the file’s (or is in your Trash), yours is kept and the file’s version becomes a conflict copy you can review.
  • Folders are matched by id, or by name under the same parent folder; tags by id or by name (ignoring case). Tags in the file are added to your snippets; none are removed.
  • Remembered values and usage counts are never imported.
  • Snippets with more than 50 fragments or more than 2,000,000 characters are skipped.

When it finishes, Import finished lists the snippets added, already in the library, kept as conflicts and skipped, plus the folders and tags added or matched, with a Review conflicts button.

Import errors

Message Meaning
This file is not a Snipstack export. The file is not in Snipstack’s export format.
This file was made by a newer Snipstack. Update Snipstack, then import again.
This file is too large to import (over 100 MB). Files over 100 MB cannot be imported.
Could not read this file. The file could not be opened or read.
An import is already running. Wait for the current import to finish.

Moving to a new computer

Either connect both computers to the same database (Sync with Turso), or export on the old one and import on the new one.