.VBS

VBS File

VBScript file (Visual Basic Script)
Ask a question
QUICK ANSWER

A VBS file is a VBScript - plain-text source code that Windows runs with its built-in Windows Script Host. Double-clicking a .vbs executes it immediately; it does not open it. To read the code safely, right-click the file and choose Edit. Treat any unexpected .vbs as potentially malicious.

Developer: Microsoft Category: Executable Files MIME: text/vbscript
OPENS ON Windows macOS Linux
Related: .APK · .EXE · .JAR · .EX4

On this page

19k+ extensions indexed
Last reviewed Aug 12, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the VBS file format?

A .vbs file is a text file that contains source code written in VBScript (Visual Basic Script). Because .vbs files are executed directly by Windows, they should be treated with caution - they may contain malicious code. Related encoded variants are saved with the .vbe extension.

VBScript

VBScript is a scripting language created by Microsoft, derived from Visual Basic. It is commonly used for creating scripts and macros for various Windows applications and system automation tasks. VBScript is based on the BASIC language family but is a lightweight subset designed for scripting rather than standalone application development.

On Windows, .vbs files are run by Windows Script Host - either wscript.exe (with dialog output) or cscript.exe (console output). Scripts can automate file operations, read and write the registry, and control COM objects via CreateObject(). Broader automation workflows can combine .vbs scripts inside a .wsf container. Microsoft now recommends .ps1 for new scripting tasks, as VBScript support was deprecated in Windows 11 24H2.

Security & safety

RISK: HIGH

.vbs is one of the classic Windows malware formats. Double-clicking a .vbs RUNS it immediately with your user privileges via Windows Script Host - it can delete files, edit the registry, download payloads or spread itself (the ILOVEYOU worm of 2000 was a .vbs). Rules: never run a .vbs that arrived by email, chat or download unless you wrote it or fully trust it; to inspect one, ALWAYS right-click > Edit (open as text) rather than open it, so it doesn't execute; be suspicious of double extensions like 'invoice.pdf.vbs'. Because of this history and VBScript's deprecation, many environments now block .vbs outright. If you received one unexpectedly, treat it as hostile and delete it.

Format details

in a nutshell
FULL NAMEVBScript file (Visual Basic Script)
DEVELOPERMicrosoftsince 1996 (VBScript 1.0, with Internet Explorer 3); Windows Script Host shipped from 1998 (Windows 98)
MIME TYPEtext/vbscript
TYPEPlain-text script source code (run by Windows Script Host)

Programs that open VBS files

Windows4 apps
Notepad Open-source Open the .vbs for syntax-highlighted reading/editing - the safe way to inspect a script before deciding anything.
Notepad (built-in) Built-in RIGHT-click the .vbs > Edit (or open Notepad first, then File > Open) to READ the code safely without running it.
Visual Studio Code Free Open the file to read/edit with highlighting; good for understanding what a script does.
Windows Script Host (wscript / cscript) Built-in To RUN a trusted script: double-click (wscript) or 'cscript script.vbs' in a console. Only do this for code you trust - it runs with your privileges.
macOS1 app
Any text editor (TextEdit, VS Code) Free macOS can only READ the code, not run it - VBScript needs Windows Script Host. Open in TextEdit or VS Code to inspect.
Linux1 app
Any text editor (VS Code / gedit) Free Linux can only read the source; there is no native VBScript runtime. Open it to read what it does.

Technical details

deep spec
File typePlain-text VBScript source code
Execution engineWindows Script Host (WSH)
MIME typetext/vbscript
Binary signatureNone - plain text; identified by VBScript keywords, not a byte sequence
Default GUI runnerwscript.exe
Default console runnercscript.exe
VBScript version5.8 (final release, included with Windows 7 and later)
Case sensitivityCase-insensitive - keywords and identifiers are not case-sensitive
Line continuationUnderscore character (_) at end of line
Error handlingOn Error Resume Next / On Error GoTo 0
Object accessCOM and ActiveX objects via CreateObject()
Deprecation statusDisabled by default in Windows 11 24H2 (October 2024); planned full removal in a future release
Security riskCan access filesystem, registry, and network with few restrictions - historically a common malware vector
Released1996 (VBScript 1.0, with Internet Explorer 3); Windows Script Host shipped from 1998 (Windows 98)
Specificationlearn.microsoft.com

VBS conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with VBS files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about VBS files.

Frequently asked questions

How do I open a .vbs file to see what's inside?
Right-click it and choose Edit, or open Notepad/Notepad++/VS Code first and then open the file. This shows the code as text WITHOUT running it. Do not double-click - that executes the script.
Is a .vbs file safe?
Treat it as dangerous unless you trust the source. Double-clicking a .vbs runs it with your permissions and it can do real harm (delete files, change the registry, install malware). The infamous ILOVEYOU worm was a .vbs. Inspect via right-click > Edit; never run unexpected ones.
How do I run a VBScript file?
Double-click it (it runs under wscript.exe) or, for console output, run 'cscript script.vbs' in Command Prompt. Only do this for scripts you trust. On Windows 11 24H2 you may need the optional VBScript feature enabled.
Why does my .vbs not run on Windows 11?
Microsoft deprecated VBScript. In Windows 11 version 24H2 it's an optional 'Feature on Demand' (enabled by default for now) and is scheduled to stop being enabled by default around 2027, then be removed entirely. Check Settings > System > Optional features, and plan to migrate scripts to PowerShell.
Can I convert a VBScript to PowerShell?
Not with a one-click tool - you rewrite it. PowerShell can do everything VBScript did and is the format Microsoft recommends going forward, so migrating legacy .vbs to .ps1 is the right move.
What's the difference between .vbs and .vbe?
.vbs is readable VBScript source; .vbe is the same script run through Microsoft's old Script Encoder to obfuscate it. The encoding is weak and easily reversed, and it's commonly used by malware to hide intent.

References

1Microsoft - VBScript User's Guide (archived docs)learn.microsoft.com
2Microsoft - Windows Script Host overviewlearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.EXEWindows Executable (Portable Executable)
4.PARTPartial Download File
5.BINCD/DVD Disc Image (BIN/CUE)
6.DATProgram Data File (generic)
7.RPMSGRestricted Permission Message
8.MDMarkdown Document
9.TXTPlain Text File
10.NOMEDIAAndroid No-Media Marker File

Related extensions

.APKAndroid Package
.EXEWindows Executable (Portable Executable)
.JARJava Archive
.EX4MetaTrader 4 Compiled Program (Expert Advisor / Indicator / Script)
.APPXMicrosoft Windows App Package (AppX)
.AIRAdobe AIR Application Installer Package

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z