Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>SQLite ForgeNew to Visual Studio Code? Get it now.
SQLite Forge

SQLite Forge

Omair Saad

|
65 installs
| (1) | Free
Open, browse, edit and query SQLite databases in VS Code: spreadsheet grid, row details, schema editor, SQL workbench with autocomplete and parameters, relationship diagram, health checks, undo, schema & data compare with migrations, snapshots, charts, test data, Excel export, bulk edit, index advis
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SQLite Forge

Open, browse, edit and query SQLite databases without leaving VS Code.

Click any .sqlite, .sqlite3, .db, .db3, .s3db or .sl3 file and it opens in a fast, spreadsheet-style editor with a row details panel, a structure editor, a SQL workbench and a relationship diagram. No native modules and nothing to install separately: it works the same on Windows, macOS, Linux and remote workspaces.

The SQLite Forge data grid with the row details panel open

  • Edit like a spreadsheet: type, press Enter, keep going. Every edit is checked against the column's type and constraints.
  • Safe by default: changes stay in memory until you Save, every change can be undone, and read-only mode locks a file completely.
  • Live reload: when your app writes to the database (including WAL mode), the editor updates on its own.
  • Private: your data never leaves your machine. No account, no telemetry.

Everything in SQLite Forge is free, including the power tools: schema and data compare with generated migrations, snapshots, charts, a test data generator, Excel export, bulk edit and an index advisor.


Edit cells in place

Double-click a cell, press Enter or F2, or just start typing. Long values wrap in the editor instead of scrolling off to the side. Click Update or press Enter to apply and move down, press Tab to move right, or Esc to cancel.

Editing a cell: the editor shows the column name and type with Update and Cancel buttons

  • Values follow the column type: 12 typed into an INTEGER column is stored as a number. The editor warns you before text goes into a number column.
  • Set to NULL with one click or Ctrl+Shift+0. NOT NULL columns can't be set to NULL by mistake.
  • Long text and JSON open in a larger editor with Format JSON. BLOBs open in a hex viewer.

Row details panel

Press Ctrl+I (or Details) to see every field of the selected row. Edited fields are highlighted, and Update row writes them all in one transaction: if one value is rejected, none are applied and your edits stay in place so you can fix them.

The Details panel with two edited fields and the Update row button

Add rows with a clear form

Every field says what an empty value means: auto (the id is assigned for you), default (the column default is used), or required. Missing required fields are pointed out before anything is written.

The Add row form with required, automatic and default fields

Filter, sort and search

Click a header to sort. Open Filter for a filter box on every column, or search all columns at once.

Filter Matches
abc contains "abc" (not case-sensitive)
=42, !=x equals, not equals
>10, <=2024-01-01 compares numbers or text
10..20 between 10 and 20
NULL, !NULL is empty, is not empty
"" empty text

Orders filtered to delivered orders over 500, sorted by total

Also in the grid: pin columns, show or hide columns, resize and fit widths, compact or comfortable rows, select several rows to duplicate or delete them, and copy rows as CSV, TSV (pastes into Excel or Google Sheets), JSON, INSERT statements or Markdown. Right-click a foreign-key value to open the linked row.

SQL workbench

A SQL editor with syntax highlighting, autocomplete for tables, columns (including alias.column), functions and keywords, and one-click formatting.

The SQL tab running a query, with history on the right

  • Ctrl+Enter runs everything (or the selection). Ctrl+Shift+Enter runs only the statement under the cursor.
  • Each statement gets its own result with row count, timing and rows changed. Errors point at the statement that failed.
  • Query parameters: write :name, @name, $name, ?2 or ? and SQLite Forge asks for the values when you run the query, and remembers them. Numbers are passed as numbers; put text in single quotes ('042') to keep it as text.
  • EXPLAIN QUERY PLAN as a tree, with full table scans highlighted.
  • Query history for each database, saved queries, and ready-made snippets.

The query parameters dialog asking for :country and :since

Structure

Columns, types, defaults, keys, indexes, foreign keys, triggers and the CREATE statement in one view. Add, rename and drop columns, create unique, partial or descending indexes, and rename, empty or drop tables. The New table designer covers primary keys, AUTOINCREMENT, NOT NULL, UNIQUE, DEFAULT, REFERENCES, WITHOUT ROWID and STRICT, with a live SQL preview.

The Structure tab for the orders table

Relationship diagram

The Diagram tab draws every table with its columns and the foreign keys between them. Drag boxes to arrange them (positions are remembered), pan and zoom (Ctrl+scroll), find a table, double-click to open it, and export the diagram as SVG.

The relationship diagram of a shop database

Database info and health

⋯ → Database info and health shows file size, page usage, unused space, journal mode, encoding, user_version and the largest tables. Run an integrity check, find rows whose foreign keys point at missing parents, and VACUUM or ANALYZE the database.

The database health dialog after a passing integrity check

Undo, redo and read-only mode

Every change, whether a cell edit, an imported file, a dropped column or a script you ran, can be undone with Ctrl+Z and redone with Ctrl+Y, until you save. Click the lock in the header to make a database read-only: SQLite itself then refuses every change, including from the SQL tab. Your choice is remembered per file, and sqliteForge.openReadOnly makes read-only the default.

Saving and live reload

Edits are made in memory and the tab shows as modified. Save (Ctrl+S) writes the file, and Revert discards every unsaved change. Hot exit and backups work like any other VS Code file. Prefer writing after every change? Turn on sqliteForge.autoSave.

When another program writes to the database (your app, a migration, a CLI), the open editor reloads within about two seconds, including changes still held in the -wal file of WAL-mode databases. If you have unsaved edits, a banner asks before anything is replaced.

Import and export

  • Import CSV, TSV or JSON into a new table (column types are detected) or into an existing table (headers are matched by name). The whole import runs as one transaction.
  • Export a table or query result as CSV, JSON, SQL INSERTs or Markdown, and the whole database as a SQL dump.

Sidebar

The SQLite Forge view in the activity bar has three sections:

  • Databases: open databases with their tables (with row counts), views, indexes, triggers and columns. Right-click for Open, Structure, Select first 100 rows, Copy name, Drop, New query and Export dump.
  • Workspace Databases: every SQLite file in your open folders, found when you expand the section (files are checked for the SQLite header, so other .db files such as Thumbs.db are skipped).

You can also run the current .sql file, or the selected text, against an open database from the editor title bar.


Power tools

For developers who work with SQLite every day. Each tool runs locally, on your machine, and every change it makes is a single undoable step.

Schema compare and migrations

Compare the open database with another file, another open database, a snapshot, or its own saved version on disk. SQLite Forge lists every added, removed and changed table, column, index, view and trigger, and writes the migration script:

  • new columns that SQLite can add in place use ALTER TABLE … ADD COLUMN;
  • every other table change uses the 12-step rebuild SQLite requires, keeping the data of all common columns;
  • indexes, views and triggers are dropped and recreated in a safe order, and the script ends with PRAGMA foreign_key_check.

Apply it to the open database in one step (undoable, nothing is written until you save), open it in an editor, or copy it.

Schema compare between a development and a production database

Data compare

Row-by-row comparison of every table by primary key (or rowid): added, removed and changed rows with the changed cells highlighted, plus an INSERT / UPDATE / DELETE sync script.

Snapshots

Save named restore points of a database ("Before migration"), restore them with undo, or compare the current state against any snapshot. Snapshots are stored privately by VS Code, never in your project.

The Snapshots dialog

Result charts

Chart any query result as a bar, line, area, scatter or pie chart: pick the X and Y columns and an optional aggregate. Charts follow your VS Code theme, show values on hover, and export as SVG or PNG.

A line chart of monthly revenue with a hover tooltip

Test data generator

Fill a table with realistic rows. Generators are picked from column names and types (names, emails, dates, prices, URLs, UUIDs, coordinates, status values and more) and can be changed per column. NOT NULL and UNIQUE are respected and foreign keys point at rows that exist. The same seed always gives the same rows, and a preview is shown before anything is inserted.

The test data generator with column generators and a preview

Bulk edit

Change one column on the selected rows, or on every row that matches the current filters: set a value, find and replace, or apply a SQL expression such as upper(name) or price * 1.1. A live preview shows how many rows will change, with before and after values.

Bulk edit with a preview of the rows that will change

Index advisor

Click Suggest indexes under a query plan. SQLite Forge finds the tables the query reads in full, proposes indexes on the columns it filters, joins and sorts by, and proves each one: the index is created inside a savepoint, the plan is read again, and everything is rolled back. You only see indexes SQLite actually uses, with the plan before and after.

The index advisor suggesting an index that turns a table scan into an index search

Advanced export

Export tables and query results to Excel (.xlsx) with a bold, frozen header row and filters, or to JSON Lines. Export all tables writes a single workbook with one sheet per table, or one CSV / JSON / JSON Lines / SQL / Markdown file per table.


Light, dark and high contrast

SQLite Forge uses your VS Code theme's colours, so it fits in with whatever theme you use.

SQLite Forge in a light theme

Keyboard shortcuts

Keys Action
Arrow keys, Tab, Home, End, PgUp, PgDn Move between cells
Enter, F2, or start typing Edit the cell
Enter / Tab / Esc (while editing) Update and move down / update and move right / cancel
Shift+Enter (while editing) New line in the value
Ctrl+Shift+0 Set the cell to NULL
Space, Ctrl+A Select the row, select all rows on the page
Ctrl+C, Delete Copy the cell or rows, delete selected rows
Ctrl+Z, Ctrl+Y Undo, redo a change to the database
Ctrl+I Show or hide the Details panel
Ctrl+F, Ctrl+P, Ctrl+E Search rows, find a table, open the SQL tab
Ctrl+Enter, Ctrl+Shift+Enter Run the query, run the statement under the cursor
Ctrl+S Save the file

On macOS use Cmd instead of Ctrl.

Settings

Settings are grouped under SQLite Forge in the Settings editor.

Setting Default Description
sqliteForge.pageSize 100 Rows per page in the grid
sqliteForge.maxQueryRows 5000 Rows shown per query result (the full count is still reported)
sqliteForge.historySize 200 Query history entries kept per database
sqliteForge.autoSave false Write to the file after every change instead of on Save
sqliteForge.autoReload true Reload when another program changes the file (asks first if you have unsaved edits)
sqliteForge.undoLimit 50 Changes you can undo per open database (0 turns undo off; off for files over 128 MB)
sqliteForge.openReadOnly false Open databases read-only by default
sqliteForge.foreignKeys true Turn on PRAGMA foreign_keys when opening a database
sqliteForge.workspace.findDatabases true List the SQLite files of the open folders in the sidebar
sqliteForge.workspace.exclude **/{node_modules,.git,…}/** Folders to skip when looking for databases
sqliteForge.workspace.maxResults 200 Maximum databases listed in the sidebar
sqliteForge.snapshots.maxPerDatabase 20 Snapshots kept per database

Troubleshooting

  • "This file is not a SQLite 3 database." The file is encrypted (for example SQLCipher), empty, or another format. Encrypted databases aren't supported.
  • The editor doesn't show what my app just wrote. Make sure sqliteForge.autoReload is on, or use ⋯ → Reload from disk. Changes your app still holds in an open transaction aren't visible to any other program, including this one.
  • Save asks about a write-ahead log. Another program has the database open in WAL mode. Close that program first, then save, so it doesn't overwrite your changes.
  • Undo isn't available. Undo is off for files over 128 MB and while a transaction you started with BEGIN is still open. Hover the undo button to see why.
  • Large files feel slow. The whole database is loaded into memory (SQLite compiled to WebAssembly), so files of several hundred MB need a matching amount of RAM. Long queries also block until they finish.

Privacy

  • Your databases never leave your machine. SQLite Forge has no telemetry and no analytics, needs no account, and never connects to the internet.
  • Snapshots are stored in VS Code's private extension storage on your machine.

Security

  • The editor webview runs with a strict Content Security Policy (scripts only with a per-load random nonce, no remote content).
  • Read-only mode is enforced by SQLite itself (PRAGMA query_only), not only by the user interface.
  • Report security issues privately through GitHub security advisories.

FAQ

Is it really free? Yes. Every feature described on this page is free, with no account and no sign-up.

Does it work offline? Completely.

Does SQLite Forge change my file when I just look at it? No. Nothing is written until you save, and read-only mode makes accidental changes impossible.

Where do I report bugs or ask for features? In the issue tracker. License terms are in LICENSE.

Good to know

  • The database is loaded into memory (SQLite compiled to WebAssembly). Other programs see your changes once you save.
  • Encrypted databases (SQLCipher) are not supported.

Credits

Database engine: sql.js (MIT), a WebAssembly build of SQLite (public domain). Icons: Codicons by Microsoft (CC BY 4.0). See ThirdPartyNotices.md.

"SQLite" is a registered trademark of Hipp, Wyrick & Company, Inc. SQLite Forge is an independent project and is not affiliated with or endorsed by the SQLite developers.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft