VS Code snippet generator
Plain code in.
Snippet out.
Paste your code, give it a name and prefix, and get a ready-to-use VS Code snippet file. Everything runs locally in your browser.
Snippet details
These become the keys and values in your snippet file.
Turn this off to treat every $ as literal text.
Your code
greeting-function.code-snippets
Your code never leaves this page. Conversion runs locally in your browser.
How it works
From clipboard to command palette.
-
Paste your code
Drop in a function, a config block, or any plain text. Line breaks and indentation are preserved.
-
Describe the snippet
Choose a name, the prefix you will type in VS Code, and an optional language scope.
-
Copy or download
Paste the JSON into your user snippets, or save the
.code-snippetsfile and keep it with your setup.
In VS Code, open the Command Palette and run Preferences: Configure User Snippets to add it.
FAQ
Good to know.
Short answers about snippet files, dollar signs, and prefixes.
Where do I put the generated file?
Save the downloaded .code-snippets file in your VS Code snippets folder, or open the Command Palette and run Preferences: Configure User Snippets. You can paste the JSON into an existing snippet file as well.
Why is my dollar sign escaped?
VS Code uses $ for tab stops and variables. The converter escapes dollars that are not snippet syntax, so code such as $('.item') or ${name} stays intact. Turn off “Keep placeholders” to escape every dollar sign.
What is a prefix?
The prefix is the shortcut you type in the editor to insert the snippet. For example, a prefix of greet lets you type greet, press Tab, and expand the snippet.
Is my code uploaded anywhere?
No. There is no server, account, or analytics. The conversion runs entirely in this browser tab.