What Is snippet-generator.app?
Updated
snippet-generator.app is a free browser-based tool that turns a block of code into a ready-to-paste snippet file for Visual Studio Code, Sublime Text, or Atom. You paste the code you want to reuse, fill in a name, a trigger prefix, and an optional description, and the site outputs the snippet in the exact format the chosen editor expects. It is useful when you want a reusable snippet but don't want to hand-write the JSON, XML, or CSON syntax each editor requires.
What the site actually does
The site's own description is short: "Snippet generator for Visual Studio Code, Sublime Text and Atom." That is the whole product. It is a formatter, not a snippet library — it doesn't ship pre-made snippets, and it doesn't install anything into your editor. You bring the code; it handles the wrapper.
The workflow is the same regardless of editor:
- Choose the target editor (VS Code, Sublime Text, or Atom).
- Paste the code body you want the snippet to expand into.
- Enter a prefix (the trigger you type to invoke the snippet) and a name (the snippet's identifier).
- Optionally add a description.
- Copy the generated output and save it to the location your editor reads snippets from.
The value is in step 5. Each editor stores snippets differently, and the generator writes the correct structure so you don't have to look up the schema.
Output format by editor
| Editor | Output format | Where it typically goes |
|---|---|---|
| Visual Studio Code | JSON | A .code-snippets file, or the language-specific JSON snippet file |
| Sublime Text | XML (.sublime-snippet) |
Your Packages/User folder |
| Atom | CSON | The snippets.cson file in your Atom config |
Because the formats differ, the same pasted code produces three different outputs. If you switch editors later, you re-run the generator rather than converting the file by hand.
Placeholders and tab stops
The main reason to use a generator instead of writing the file yourself is placeholder handling. Snippets commonly need cursor positions and fill-in-the-blank fields — in VS Code these look like $1, $2, and ${1:default text}. Getting the numbering and escaping right by hand is error-prone, especially when the pasted code already contains $ characters.
The generator lets you mark these positions in the pasted body and emits them in the correct syntax for the selected editor. The practical check: after saving the snippet, trigger it in the editor and press Tab. If the cursor jumps through the fields in the order you intended, the placeholders were generated correctly. If it jumps somewhere unexpected or stops early, the placeholder numbering needs fixing.
When this is worth using
Use it when:
- You keep retyping the same boilerplate (a test scaffold, a logging block, a component skeleton) and want a trigger word for it.
- You're writing a snippet file for the first time and don't know the schema.
- You need the same snippet in more than one editor.
Skip it when:
- You only need a one-off paste — a snippet file is overhead if you won't reuse the code.
- Your editor already has a built-in snippet manager you're comfortable with, since the generator still requires you to save the output file manually.
Common snags
- Wrong save location. A correctly generated snippet does nothing if it's saved where the editor doesn't look. Confirm the folder for your editor and version before assuming the snippet is broken.
- Escaping. Code containing quotes, backslashes, or
$signs can break the generated file if the body isn't escaped properly. If the snippet fails to load, check those characters first. - Scope. A snippet scoped to one language won't appear in another. If your trigger does nothing, verify the snippet's language scope matches the file you're editing.
- No install step. The site generates text only. Nothing is synced to your editor, so you copy and save the output yourself.