VS Code Snippet Generator
Paste code, add a prefix and name the words that should become tab stops to get VS Code snippet JSON with mirrored placeholders and escaped characters.
- Free
- No sign-up
- Works on any device
About VS Code Snippet Generator
A VS Code snippet is a JSON object with a prefix you type, a body made of lines of text and optional tab stops. Paste your code, give it a prefix and name, and list the words that should become tab stops. The first time a word appears it becomes a numbered placeholder with the word as default text, and later occurrences become mirrors that change as you type. Dollar signs and backslashes in your code are escaped, and leading spaces can be converted to tabs. Example: for (const item of items) with item and items listed becomes for (const ${1:item} of ${2:items}).
How to use VS Code Snippet Generator
- Paste the code and type the prefix, name and, if you like, a description and the languages.
- List the words that should become tab stops, separated by commas, and choose how indentation is written.
- Copy the JSON into your snippets file: Command Palette, Snippets: Configure Snippets, then paste inside the outer braces.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
How are the tab stop numbers decided?
By the order in which the words first appear in your code, not the order of the list. Press Tab in VS Code to jump from number 1 to 2 and so on, and the final cursor lands at the end.
Why are dollar signs in my code escaped?
In a snippet, a dollar sign starts a variable or tab stop. To insert a literal dollar sign, it must be written with a backslash, so the generator does that for you unless you ask it to keep your own snippet syntax.
Can I limit the snippet to certain languages?
Yes, enter language identifiers such as javascript,typescript in the languages field. They are written as the scope property, which VS Code uses for snippets in a global snippets file.
Is VS Code Snippet Generator free?
Yes. VS Code Snippet Generator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.