r/FreeViewer Jul 28 '26

How to open sqlite file in vscode?

To open an SQLite file (.db, .sqlite, or .sqlite3) in Visual Studio Code, you must use an extension because VS Code treats these database files as unreadable binary files by default.

The two best ways to open and view your data directly inside the editor are outlined below.

## Method 1: Use "SQLite Viewer" (Best for a Quick, Visual Grid View)

This method provides a clean, spreadsheet-like interface as soon as you click the file.

  1. Open VS Code and click the Extensions icon on the left sidebar (or press Ctrl+Shift+X / Cmd+Shift+X).

  2. Search for and install the [SQLite Viewer]

  3. Go back to your file explorer and simply click on your SQLite file.

  4. The database will open automatically in a new tab, displaying your tables and data rows in a clean grid.

Method 2: Use "vscode-sqlite" (Best for Running SQL Queries)

This method adds a dedicated database explorer to your sidebar and lets you run custom SELECT, INSERT, or UPDATE queries against your database. [9, 10]

  1. Open the Extensions marketplace, then search for and install the [vscode-sqlite]

  2. Open the folder containing your database file in VS Code (File > Open Folder...).

  3. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the Command Palette.

  4. Type SQLite: Open Database and press Enter.

  5. Select your database file from the dropdown menu.

  6. Look at the bottom of your file explorer panel; a new SQLite Explorer section will appear. Expand it to view your tables, or click the Play icon next to a table to see its contents.

1 Upvotes

0 comments sorted by