DEV Community

Cover image for I Built a VS Code Extension to Upload Code Snippets to PasteDB in One Click 🚀

I Built a VS Code Extension to Upload Code Snippets to PasteDB in One Click 🚀

Aditya Sorathiya on July 17, 2026

I created the official PasteDB VS Code extension that lets you upload your current file or selected code directly from Visual Studio Code. It inclu...
Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Do any one tried the extension?
Is there something missing?

Collapse
 
codemaster_121482 profile image
Seif Ahmed

I will try it. But can you explain how it works? What is PasteDB, exactly? How does it benefit me?

Thanks in advance!

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

PasteDB is a modern paste-sharing platform for developers, students, and anyone who needs to quickly share text, code snippets, logs, notes, or even images using a simple link.
Instead of sending code in chat apps or emails, you can create a paste and share a URL instantly. It supports syntax highlighting, Markdown, custom URLs, password protection, expiration, burn-after-read, end-to-end encrypted pastes, QR sharing, nearby device transfer, analytics, and even a VS Code extension so you can upload code without leaving your editor.
You don't even need an account to create a public paste, but signing in lets you manage your pastes from a dashboard.

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Thanks! 😊
The VS Code extension is a companion to PasteDB. It lets you upload code snippets directly from VS Code without opening your browser.
Just select the code you want to share, run the PasteDB command (or use the context menu), and the extension uploads it to PasteDB, automatically copying the shareable link to your clipboard.
It's useful when you want to quickly share code with teammates, ask for help on forums, submit snippets in chats, or save code for later—all without leaving your editor.
If you use an API key, the pastes are saved to your PasteDB account so you can manage them later. You can also create guest pastes if you don't want to sign in.
I'd love to hear your feedback if you give it a try!

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

The extension is a companion to PasteDB that lets you upload code snippets directly from VS Code without opening your browser. Simply select the code you want to share, right-click, choose Upload to PasteDB, and it uploads the snippet and copies the shareable link to your clipboard.
Setup is simple:

  1. Install the PasteDB extension from the VS Code Marketplace.

  2. Generate an API key from your PasteDB dashboard and save it in the extension. With an API key, your pastes are linked to your account and can be managed later.

3.Select some code, right-click, and choose Upload to PasteDB (or use the Command Palette).

The goal is to make sharing code as quick as possible without interrupting your workflow. If you give it a try, I'd really appreciate any feedback or suggestions!

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya • Edited

If you want end to end encrypted pastes use the web interface at
pastedb.netlify.app/create

As the e2ee is added to web interface only for now

E2ee pastes can be made by selecting Unlisted Or Private as visibility
For e2ee docs go to
pastedb.netlify.app/e2ee

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Tip: If pastedb.netlify.app is blocked in your country, try using a VPN for the best experience. Alternatively, you can access the GitHub Pages mirror at sorathiya903.github.io/pastedb/⁠

Note: If you encounter a 404 Not Found page, make sure the URL contains /pastedb/ after the domain. If it doesn't, simply append /pastedb/ to the URL and reload the page.

Example:
sorathiya903.github.io/explore
sorathiya903.github.io/pastedb/exp...

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Can any one make a paste as a registered user
I want my 1st registered user

Collapse
 
codemaster_121482 profile image
Seif Ahmed

Super good job 👏👍

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

The first user for me for extension????

Some ONE installed my extension!!!!!

Collapse
 
shiwei_xie_24a93f54203fb3 profile image
shiwei xie

Nice write-up! For devs who deal with messy copied text, TextStow might help — it's a Mac menu bar tool combining clipboard history with prompt templates and text cleanup. Free: textstow.com

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Thanks! I appreciate it. 😊 TextStow looks interesting for clipboard management and text cleanup. PasteDB is focused on making it quick to upload and share code snippets (and other content) through shareable links, especially directly from VS Code. Thanks for sharing!