Skip to content
Cheat sheet · HeidiSQL

HeidiSQL Keyboard Shortcuts Cheat Sheet

The default HeidiSQL keyboard shortcuts, grouped by task: running and editing SQL, searching, editing data in the grid, filtering, and moving between panels and tabs. The keys come from the action definitions in HeidiSQL's own source code and the help page, so they match a fresh installation. Every shortcut can be changed under Tools > Preferences > Shortcuts.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: HeidiSQL 12.21 (Windows and Linux default key bindings). Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • F9 runs all queries in the tab, Ctrl+F9 runs the selection, Ctrl+Shift+F9 runs the query under the cursor.
  • Ctrl+T opens a new query tab, Ctrl+Space shows SQL completion, Ctrl+F8 reformats SQL.
  • In the data grid: F2 edits a cell, Insert adds a row, Ctrl+Enter posts changes, Esc cancels, Ctrl+Shift+N sets NULL.
  • Ctrl+D jumps to the database tree, Ctrl+E to the table filter, F6 switches between query and results.
  • All shortcuts are customisable in Tools > Preferences > Shortcuts, which has a filter box since 12.18.
How we know: Research-based: default shortcuts were read from the action definitions in HeidiSQL's main window source (main.dfm) in the official GitHub repository and cross-checked with the HeidiSQL help page on 8 October 2026. The Lazarus (Linux and macOS) branch defines the same values. HeidiSQL does not publish macOS key equivalents, so none are listed. If you have changed shortcuts in Preferences, your keys will differ.

HeidiSQL shortcuts for running and editing SQL

Query tab and SQL editor
ActionWindows and Linux
Run all queries in the tabF9
Run selectionCtrl+F9
Run current query (at the cursor)Ctrl+Shift+F9
Cancel running operationEsc
New query tabCtrl+T
Close query tabCtrl+F4
Clear query editor (or filter editor)Ctrl+W
Load SQL fileCtrl+O
Save SQL to fileCtrl+S
Save asF12
Save selection to fileCtrl+Shift+S
Reformat SQLCtrl+F8
Show SQL completion proposalCtrl+Space
Move line up / downAlt+Up / Alt+Down
Selection to upper caseCtrl+U
Selection to lower caseCtrl+L
Delete wordCtrl+Del
SQL help browserF1
Previous / next result tabAlt+Left / Alt+Right
Switch between query and resultsF6
Clear query logCtrl+Q
Search, replace and filters
ActionWindows and Linux
Find textCtrl+F
Replace textCtrl+R
Find or replace againF3
Find text on server (search all tables)Ctrl+Shift+F
Filter panelCtrl+Alt+F
Multi column filter (data tab)F7
Apply filterF9
Quick filter: column equals focused valueCtrl+Shift+1
Quick filter: column not equal to focused valueCtrl+Shift+2
Quick filter: column equals prompted valueCtrl+Shift+3
Quick filter: column not equal to prompted valueCtrl+Shift+4
Quick filter: column equals clipboardCtrl+Shift+5
Quick filter: column not equal to clipboardCtrl+Shift+6

Editing data in the grid

Ctrl+Del deletes selected rows in a grid and deletes a word in the SQL editor; the focused panel decides which applies.

Data tab and result grid
ActionWindows and Linux
Edit the focused cellF2
Insert rowInsert
Duplicate row without keysCtrl+Insert
Delete selected rowsCtrl+Del
Post (save) changesCtrl+Enter
Cancel editingEsc
Set focused cell to NULLCtrl+Shift+N
Insert SQL function call in cell, e.g. NOW()Ctrl+F2
Reset sortingAlt+S
Load next rowsCtrl+Alt+Page Down
Show all rowsCtrl+Alt+End
Select allCtrl+A
Invert selectionCtrl+I
Copy / cut / pasteCtrl+C / Ctrl+X / Ctrl+V
Copy with tabs to spacesCtrl+Shift+C
UndoAlt+Backspace
Print list or dataCtrl+P
Panels, tabs, tree and application
ActionWindows and Linux
Go to database treeCtrl+D
Go to table filterCtrl+E
Go to main tab 1 to 5Ctrl+1 to Ctrl+5
Next / previous tabCtrl+Tab / Ctrl+Shift+Tab
Edit selected object (tree)Alt+Enter
Empty table(s)Shift+Del
RefreshF5
Full status refreshShift+F5
Auto refresh (process list and similar)Ctrl+F5
Kill process (process list)Del
New windowCtrl+N
ExitAlt+F4

Changing shortcuts, and macOS

Customise. Open Tools > Preferences and the Shortcuts tab. Select an action in the tree, then set a Shortcut and an optional Secondary shortcut; release 12.18 added a filter box to find actions quickly. Custom keys override the defaults listed here.

macOS. The macOS app is built from the same Lazarus code base and defines the same shortcut values, but HeidiSQL does not document how Ctrl and Alt map to the Command and Option keys on a Mac. Check the menus or the Shortcuts tab on your Mac rather than assuming a mapping.

For more on HeidiSQL itself, see the HeidiSQL review.

Frequently asked questions

What is the shortcut to run a query in HeidiSQL?

F9 runs all queries in the tab, Ctrl+F9 runs the selected text, and Ctrl+Shift+F9 runs only the query at the cursor.

How do I format SQL in HeidiSQL?

Press Ctrl+F8 (Reformat SQL). The help page also recommends it for views that MySQL has collapsed into one line.

How do I set a cell to NULL in HeidiSQL?

Press Ctrl+Shift+N on the focused cell, then Ctrl+Enter to post the change.

Can I change HeidiSQL keyboard shortcuts?

Yes, in Tools > Preferences > Shortcuts, with a primary and secondary shortcut for each action.

Is there a printable HeidiSQL shortcut list?

Use the print button on this page. HeidiSQL itself does not publish a PDF cheat sheet.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.